From 76717fa52ba8b8e4c25a7e8f0daec4fee7e3bf07 Mon Sep 17 00:00:00 2001 From: echel0n Date: Fri, 28 Nov 2014 14:18:48 -0800 Subject: [PATCH] Downgraded Trakt errors to trigger SR logger WARNINGS instead of ERROR messages --- sickbeard/notifiers/trakt.py | 4 ++-- sickbeard/traktChecker.py | 10 +++++----- sickbeard/webserve.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sickbeard/notifiers/trakt.py b/sickbeard/notifiers/trakt.py index 3446312f..c5ff864c 100644 --- a/sickbeard/notifiers/trakt.py +++ b/sickbeard/notifiers/trakt.py @@ -107,7 +107,7 @@ class TraktNotifier: trakt_api.traktRequest("show/episode/unwatchlist/%APIKEY%", data_show) except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) def test_notify(self, api, username, password): """ @@ -127,6 +127,6 @@ class TraktNotifier: if trakt_api.validateAccount(): return True except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) notifier = TraktNotifier diff --git a/sickbeard/traktChecker.py b/sickbeard/traktChecker.py index 4adbc182..3c13474e 100644 --- a/sickbeard/traktChecker.py +++ b/sickbeard/traktChecker.py @@ -70,7 +70,7 @@ class TraktChecker(): traktShow = filter(lambda x: int(indexerid) in [int(x['tvdb_id']) or 0, int(x['tvrage_id'])] or 0, library) except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) return traktShow @@ -95,7 +95,7 @@ class TraktChecker(): try: self.trakt_api.traktRequest("show/unlibrary/%APIKEY%", data) except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) def addShowToTraktLibrary(self, show_obj): """ @@ -118,7 +118,7 @@ class TraktChecker(): try: self.trakt_api.traktRequest("show/library/%APIKEY%", data) except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) def updateShows(self): logger.log(u"Starting trakt show watchlist check", logger.DEBUG) @@ -126,7 +126,7 @@ class TraktChecker(): try: watchlist = self.trakt_api.traktRequest("user/watchlist/shows.json/%APIKEY%/%USER%") except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) return if not len(watchlist): @@ -161,7 +161,7 @@ class TraktChecker(): try: watchlist = self.trakt_api.traktRequest("user/watchlist/episodes.json/%APIKEY%/%USER%") except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) return if not len(watchlist): diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 718b67d7..7225fd7c 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -2987,7 +2987,7 @@ class NewHomeAddShows(MainHandler): for show in recommendedlist if not helpers.findCertainShow(sickbeard.showList, [ int(show[indexers[sickbeard.TRAKT_DEFAULT_INDEXER - 1]])]))) except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) return json.dumps({'results': final_results}) @@ -3031,7 +3031,7 @@ class NewHomeAddShows(MainHandler): except exceptions.MultipleShowObjectsException: continue except (traktException, traktAuthException, traktServerBusy) as e: - logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.ERROR) + logger.log(u"Could not connect to Trakt service: %s" % e.message, logger.WARNING) return _munge(t)