mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Change to gracefully handle some "key not found" failures when TVDB or TVRage return "Not Found" during show updates.
This commit is contained in:
parent
f82af467d4
commit
58d5452dc3
5 changed files with 9 additions and 3 deletions
|
@ -66,6 +66,7 @@
|
|||
* Remove restriction to not display snatched eps link in footer on Episode Overview page
|
||||
* Change the shows episodes count text colour to visually separete from year numbers at the end of show names
|
||||
* Fix release group not recognised from manually downloaded filename
|
||||
* Change to gracefully handle some "key not found" failures when TVDB or TVRage return "Not Found" during show updates
|
||||
|
||||
[develop changelog]
|
||||
* Fix traceback error when using the menu item Manage/Update Kodi
|
||||
|
|
|
@ -938,7 +938,7 @@ class Tvdb:
|
|||
# Item is integer, treat as show id
|
||||
if key not in self.shows:
|
||||
self._getShowData(key, self.config['language'], True)
|
||||
return (None, self.shows[key])[key in self.shows]
|
||||
return None if key not in self.shows else self.shows[key]
|
||||
|
||||
key = str(key).lower()
|
||||
self.config['searchterm'] = key
|
||||
|
|
|
@ -660,7 +660,7 @@ class TVRage:
|
|||
# Item is integer, treat as show id
|
||||
if key not in self.shows:
|
||||
self._getShowData(key, True)
|
||||
return (None, self.shows[key])[key in self.shows]
|
||||
return None if key not in self.shows else self.shows[key]
|
||||
|
||||
key = key.lower()
|
||||
self.config['searchterm'] = key
|
||||
|
|
|
@ -550,7 +550,9 @@ class QueueItemUpdate(ShowQueueItem):
|
|||
|
||||
logger.log(u"Retrieving show info from " + sickbeard.indexerApi(self.show.indexer).name + "", logger.DEBUG)
|
||||
try:
|
||||
self.show.loadFromIndexer(cache=not self.force)
|
||||
result = self.show.loadFromIndexer(cache=not self.force)
|
||||
if None is not result:
|
||||
return
|
||||
except sickbeard.indexer_error, e:
|
||||
logger.log(u"Unable to contact " + sickbeard.indexerApi(self.show.indexer).name + ", aborting: " + ex(e),
|
||||
logger.WARNING)
|
||||
|
|
|
@ -871,6 +871,9 @@ class TVShow(object):
|
|||
t = tvapi
|
||||
|
||||
myEp = t[self.indexerid]
|
||||
if None is myEp:
|
||||
logger.log(u'Show not found (maybe even removed?)', logger.WARNING)
|
||||
return False
|
||||
|
||||
try:
|
||||
self.name = myEp['seriesname'].strip()
|
||||
|
|
Loading…
Reference in a new issue