mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-07 03:48:02 -05:00
Downgraded Trakt errors to trigger SR logger WARNINGS instead of ERROR messages
This commit is contained in:
parent
091c9419c8
commit
76717fa52b
@ -107,7 +107,7 @@ class TraktNotifier:
|
|||||||
|
|
||||||
trakt_api.traktRequest("show/episode/unwatchlist/%APIKEY%", data_show)
|
trakt_api.traktRequest("show/episode/unwatchlist/%APIKEY%", data_show)
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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):
|
def test_notify(self, api, username, password):
|
||||||
"""
|
"""
|
||||||
@ -127,6 +127,6 @@ class TraktNotifier:
|
|||||||
if trakt_api.validateAccount():
|
if trakt_api.validateAccount():
|
||||||
return True
|
return True
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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
|
notifier = TraktNotifier
|
||||||
|
@ -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)
|
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:
|
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
|
return traktShow
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ class TraktChecker():
|
|||||||
try:
|
try:
|
||||||
self.trakt_api.traktRequest("show/unlibrary/%APIKEY%", data)
|
self.trakt_api.traktRequest("show/unlibrary/%APIKEY%", data)
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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):
|
def addShowToTraktLibrary(self, show_obj):
|
||||||
"""
|
"""
|
||||||
@ -118,7 +118,7 @@ class TraktChecker():
|
|||||||
try:
|
try:
|
||||||
self.trakt_api.traktRequest("show/library/%APIKEY%", data)
|
self.trakt_api.traktRequest("show/library/%APIKEY%", data)
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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):
|
def updateShows(self):
|
||||||
logger.log(u"Starting trakt show watchlist check", logger.DEBUG)
|
logger.log(u"Starting trakt show watchlist check", logger.DEBUG)
|
||||||
@ -126,7 +126,7 @@ class TraktChecker():
|
|||||||
try:
|
try:
|
||||||
watchlist = self.trakt_api.traktRequest("user/watchlist/shows.json/%APIKEY%/%USER%")
|
watchlist = self.trakt_api.traktRequest("user/watchlist/shows.json/%APIKEY%/%USER%")
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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
|
return
|
||||||
|
|
||||||
if not len(watchlist):
|
if not len(watchlist):
|
||||||
@ -161,7 +161,7 @@ class TraktChecker():
|
|||||||
try:
|
try:
|
||||||
watchlist = self.trakt_api.traktRequest("user/watchlist/episodes.json/%APIKEY%/%USER%")
|
watchlist = self.trakt_api.traktRequest("user/watchlist/episodes.json/%APIKEY%/%USER%")
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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
|
return
|
||||||
|
|
||||||
if not len(watchlist):
|
if not len(watchlist):
|
||||||
|
@ -2987,7 +2987,7 @@ class NewHomeAddShows(MainHandler):
|
|||||||
for show in recommendedlist if not helpers.findCertainShow(sickbeard.showList, [
|
for show in recommendedlist if not helpers.findCertainShow(sickbeard.showList, [
|
||||||
int(show[indexers[sickbeard.TRAKT_DEFAULT_INDEXER - 1]])])))
|
int(show[indexers[sickbeard.TRAKT_DEFAULT_INDEXER - 1]])])))
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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})
|
return json.dumps({'results': final_results})
|
||||||
|
|
||||||
@ -3031,7 +3031,7 @@ class NewHomeAddShows(MainHandler):
|
|||||||
except exceptions.MultipleShowObjectsException:
|
except exceptions.MultipleShowObjectsException:
|
||||||
continue
|
continue
|
||||||
except (traktException, traktAuthException, traktServerBusy) as e:
|
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)
|
return _munge(t)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user