summaryrefslogtreecommitdiff
path: root/modules/tvrage.py
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-06-09 12:32:33 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-06-09 12:32:33 +0200
commit506658e2def147ca79df9de5f4af9b3d8bc142fd (patch)
tree39e880d5d388441591451a760417d0a410dfc6a8 /modules/tvrage.py
parentfe63cfb9ee052589a166704d06ae97a3c44841bc (diff)
tvrage: Handle data without the RFC3339 field.
Diffstat (limited to 'modules/tvrage.py')
-rw-r--r--modules/tvrage.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/tvrage.py b/modules/tvrage.py
index 51263dd..cb31700 100644
--- a/modules/tvrage.py
+++ b/modules/tvrage.py
@@ -37,6 +37,15 @@ class Module:
if 'Ended' in status or 'Canceled' in status:
return '\002%s\002 does not currently air.' % data['Show Name'][0]
+ if not 'RFC3339' in data:
+ if 'Next Episode' in data:
+ return '\002%s\002 %s airs in %s, on %s' % (data['Show Name'][0],
+ data['Next Episode'][1],
+ data['Next Episode'][2],
+ data['Airtime'][0])
+ else:
+ return 'Can''t find airing date for \002%s\002.'
+
# TODO: Fetch this from somewhere user-configurable
local_tz = pytz.timezone('Europe/Oslo')