mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 14:25:02 -05:00
Catch airs/network set to None
Some shows don't have a network set, which causes an exception when the value is coerced to Unicode.
This commit is contained in:
parent
9eb9400c74
commit
60cc99bfd4
@ -468,7 +468,7 @@ class MainHandler(RequestHandler):
|
||||
ical = ical + 'DESCRIPTION:' + show['airs'] + ' on ' + show['network'] + '\\n\\n' + \
|
||||
episode['description'].splitlines()[0] + '\r\n'
|
||||
else:
|
||||
ical = ical + 'DESCRIPTION:' + show['airs'] + ' on ' + show['network'] + '\r\n'
|
||||
ical = ical + 'DESCRIPTION:' + (show['airs'] or '(Unknown airs)') + ' on ' + (show['network'] or 'Unknown network') + '\r\n'
|
||||
ical = ical + 'LOCATION:' + 'Episode ' + str(episode['episode']) + ' - Season ' + str(
|
||||
episode['season']) + '\r\n'
|
||||
ical = ical + 'END:VEVENT\r\n'
|
||||
|
Loading…
Reference in New Issue
Block a user