Skip to content

Commit

Permalink
Season-Episode fixed if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
ukdtom committed May 30, 2021
1 parent 05f8ef8 commit 1960316
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,24 +250,26 @@ def doCreateXMLFile(menuCall=False):
Total = 1
Episode = str(int(Episode)-1)
Total = str(int(Total)-1)
ET.SubElement(
program,
'episode-num',
system='xmltv_ns').text = Total + '.' + Episode + '.'
else:
# Episode Missing :-(
# We create a dummy season/episode based on date time
Log.Debug('Start time will be used for season and episode: ' + startTime)
# seStartTime = startTime.strftime("%Y%m%d")
Total = startTime[:4]
Episode = startTime[4:12]
# Episode = '0'
# Total = '0'
Total = str(int(Total)-1)
Episode = str(int(startTime[4:12])-1)
Log.Debug(''.join((
'Missing episode info for "%s"' % title,
', so adding dummy info as %s:%s' % (
', so adding dummy info as %s.%s.' % (
Total, Episode))
))
ET.SubElement(
program,
'episode-num',
system='xmltv_ns').text = Total + '.' + Episode + '.'
ET.SubElement(
program,
'episode-num',
system='xmltv_ns').text = Total + '.' + Episode + '.'
except Exception, e:
Log.Exception(
'Exception when digesting %s with the error %s' % (
Expand Down
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
V0.0.1.01:
- Changed season/episode naming if missing from YouSee into S<YEAR>E<MonthDayTime>
v0.0.1.00:
- Fixed #33 Plugin kan ikke længere lave en opsætning
- See Wiki for Instructions
Expand Down

0 comments on commit 1960316

Please sign in to comment.