mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Merge pull request #292 from JackDandy/feature/ChangeHandleNotFoundOnShowUpdate
Change to gracefully handle some "key not found" failures when TVDB or T...
This commit is contained in:
commit
454fa6aaf8
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
|
* 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
|
* 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
|
* 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]
|
[develop changelog]
|
||||||
* Fix traceback error when using the menu item Manage/Update Kodi
|
* Fix traceback error when using the menu item Manage/Update Kodi
|
||||||
|
|
|
@ -938,7 +938,7 @@ class Tvdb:
|
||||||
# Item is integer, treat as show id
|
# Item is integer, treat as show id
|
||||||
if key not in self.shows:
|
if key not in self.shows:
|
||||||
self._getShowData(key, self.config['language'], True)
|
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()
|
key = str(key).lower()
|
||||||
self.config['searchterm'] = key
|
self.config['searchterm'] = key
|
||||||
|
|
|
@ -660,7 +660,7 @@ class TVRage:
|
||||||
# Item is integer, treat as show id
|
# Item is integer, treat as show id
|
||||||
if key not in self.shows:
|
if key not in self.shows:
|
||||||
self._getShowData(key, True)
|
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()
|
key = key.lower()
|
||||||
self.config['searchterm'] = key
|
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)
|
logger.log(u"Retrieving show info from " + sickbeard.indexerApi(self.show.indexer).name + "", logger.DEBUG)
|
||||||
try:
|
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:
|
except sickbeard.indexer_error, e:
|
||||||
logger.log(u"Unable to contact " + sickbeard.indexerApi(self.show.indexer).name + ", aborting: " + ex(e),
|
logger.log(u"Unable to contact " + sickbeard.indexerApi(self.show.indexer).name + ", aborting: " + ex(e),
|
||||||
logger.WARNING)
|
logger.WARNING)
|
||||||
|
|
|
@ -871,6 +871,9 @@ class TVShow(object):
|
||||||
t = tvapi
|
t = tvapi
|
||||||
|
|
||||||
myEp = t[self.indexerid]
|
myEp = t[self.indexerid]
|
||||||
|
if None is myEp:
|
||||||
|
logger.log(u'Show not found (maybe even removed?)', logger.WARNING)
|
||||||
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.name = myEp['seriesname'].strip()
|
self.name = myEp['seriesname'].strip()
|
||||||
|
|
Loading…
Reference in a new issue