From d9b95587768676599602c1a91d5e983444d40b48 Mon Sep 17 00:00:00 2001 From: Lasse Vang Gravesen Date: Sat, 10 Aug 2013 01:22:29 +0200 Subject: [PATCH] tvdb.py: When there's a next episode date, provide a time until in the return string. --- plugins/tvdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tvdb.py b/plugins/tvdb.py index 75c1212..df15c11 100644 --- a/plugins/tvdb.py +++ b/plugins/tvdb.py @@ -9,7 +9,7 @@ from zipfile import ZipFile from cStringIO import StringIO from lxml import etree -from util import hook, http +from util import hook, http, timesince base_url = "http://thetvdb.com/api/" @@ -110,7 +110,7 @@ def tv_next(inp): (first_aired, airdate, episode_desc) = ep_info if airdate > today: - next_eps = ['%s (%s)' % (first_aired, episode_desc)] + next_eps = ['%s (%s) (%s)' % (first_aired, timesince.timeuntil(datetime.datetime.strptime(first_aired, "%Y-%m-%d")), episode_desc)] elif airdate == today: next_eps = ['Today (%s)' % episode_desc] + next_eps else: