From 17cf583162b0c190c8c2f9cf9aa0900db9b539b1 Mon Sep 17 00:00:00 2001 From: lukeroge Date: Mon, 21 Nov 2011 03:48:52 +1300 Subject: [PATCH] Updated plugins/tvdb.py (New API key, formatted output) --- plugins/tvdb.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/tvdb.py b/plugins/tvdb.py index 75c1212..320bcec 100644 --- a/plugins/tvdb.py +++ b/plugins/tvdb.py @@ -13,7 +13,7 @@ from util import hook, http base_url = "http://thetvdb.com/api/" -api_key = "469B73127CA0C411" +api_key = "F021D0F747892137" def get_zipped_xml(*args, **kwargs): @@ -31,13 +31,13 @@ def get_episodes_for_series(seriesname): try: query = http.get_xml(base_url + 'GetSeries.php', seriesname=seriesname) except URLError: - res["error"] = "error contacting thetvdb.com" + res["error"] = "Error contacting thetvdb.com." return res series_id = query.xpath('//seriesid/text()') if not series_id: - res["error"] = "unknown tv series (using www.thetvdb.com)" + res["error"] = "Unknown TV series (using www.thetvdb.com)." return res series_id = series_id[0] @@ -46,7 +46,7 @@ def get_episodes_for_series(seriesname): series = get_zipped_xml(base_url + '%s/series/%s/all/en.zip' % (api_key, series_id), path="en.xml") except URLError: - res["error"] = "error contacting thetvdb.com" + res["error"] = "Error contacting thetvdb.com." return res series_name = series.xpath('//SeriesName/text()')[0] @@ -119,13 +119,13 @@ def tv_next(inp): break if not next_eps: - return "there are no new episodes scheduled for %s" % series_name + return "There are no new episodes scheduled for %s." % series_name if len(next_eps) == 1: - return "the next episode of %s airs %s" % (series_name, next_eps[0]) + return "The next episode of %s airs %s." % (series_name, next_eps[0]) else: next_eps = ', '.join(next_eps) - return "the next episodes of %s: %s" % (series_name, next_eps) + return "The next episodes of %s: %s." % (series_name, next_eps) @hook.command