From 91ee2c9ef55c7e0803fcee202506f6590ad25ace Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 27 Jul 2014 07:49:13 -0700 Subject: [PATCH] More fixes for Trakt.tv connection issues. --- sickbeard/notifiers/trakt.py | 2 +- sickbeard/traktChecker.py | 6 +++--- sickbeard/webserve.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sickbeard/notifiers/trakt.py b/sickbeard/notifiers/trakt.py index a6c0946a..f1eaf3a4 100644 --- a/sickbeard/notifiers/trakt.py +++ b/sickbeard/notifiers/trakt.py @@ -75,7 +75,7 @@ class TraktNotifier: Returns: True if the request succeeded, False otherwise """ - data = TraktCall("account/test/%API%", api, username, password, {}) + data = TraktCall("account/test/%API%", api, username, password) if data and data["status"] == "success": return True diff --git a/sickbeard/traktChecker.py b/sickbeard/traktChecker.py index 0a15b01c..bb197ded 100644 --- a/sickbeard/traktChecker.py +++ b/sickbeard/traktChecker.py @@ -55,7 +55,7 @@ class TraktChecker(): logger.log(traceback.format_exc(), logger.DEBUG) def findShow(self, indexer, indexerid): - library = TraktCall("user/library/shows/all.json/%API%/", sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) + library = TraktCall("user/library/shows/all.json/%API%/" + sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) if not library: logger.log(u"Could not connect to trakt service, aborting library check", logger.ERROR) @@ -119,7 +119,7 @@ class TraktChecker(): def updateShows(self): logger.log(u"Starting trakt show watchlist check", logger.DEBUG) - watchlist = TraktCall("user/watchlist/shows.json/%API%/", sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) + watchlist = TraktCall("user/watchlist/shows.json/%API%/" + sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) if not watchlist: logger.log(u"Could not connect to trakt service, aborting watchlist update", logger.ERROR) @@ -151,7 +151,7 @@ class TraktChecker(): Sets episodes to wanted that are in trakt watchlist """ logger.log(u"Starting trakt episode watchlist check", logger.DEBUG) - watchlist = TraktCall("user/watchlist/episodes.json/%API%/", sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) + watchlist = TraktCall("user/watchlist/episodes.json/%API%/" + sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) if not watchlist: logger.log(u"Could not connect to trakt service, aborting watchlist update", logger.ERROR) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 38f95356..a3e7028f 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -2768,7 +2768,7 @@ class NewHomeAddShows(MainHandler): final_results = [] logger.log(u"Getting recommended shows from Trakt.tv", logger.DEBUG) - recommendedlist = TraktCall("recommendations/shows.json/%API%/", sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) + recommendedlist = TraktCall("recommendations/shows.json/%API%", sickbeard.TRAKT_API, sickbeard.TRAKT_USERNAME, sickbeard.TRAKT_PASSWORD) if recommendedlist is None: logger.log(u"Could not connect to trakt service, aborting recommended list update", logger.ERROR) return @@ -2805,7 +2805,7 @@ class NewHomeAddShows(MainHandler): t = PageTemplate(headers=self.request.headers, file="home_trendingShows.tmpl") t.submenu = HomeMenu() - t.trending_shows = TraktCall("shows/trending.json/%API%/", sickbeard.TRAKT_API_KEY) + t.trending_shows = TraktCall("shows/trending.json/%API%", sickbeard.TRAKT_API_KEY) return _munge(t)