mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Fix a handler when EpisodeData is not available in tvdb and tvrage APIs
Addresses Traceback TypeError: list indices must be integers, not str. Is sometimes raised when doing a Force Full Update.
This commit is contained in:
parent
17f5da7281
commit
64bb3d53dc
3 changed files with 6 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
||||||
* Fix API endpoint Episode.SetStatus to "Wanted"
|
* Fix API endpoint Episode.SetStatus to "Wanted"
|
||||||
* Change airdateModifyStamp to handle hour that is "00:00"
|
* Change airdateModifyStamp to handle hour that is "00:00"
|
||||||
* Fix a handler when ShowData is not available in tvdb and tvrage APIs
|
* Fix a handler when ShowData is not available in tvdb and tvrage APIs
|
||||||
|
* Fix a handler when EpisodeData is not available in tvdb and tvrage APIs
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
|
|
||||||
|
|
|
@ -871,8 +871,10 @@ class Tvdb:
|
||||||
url = self.config['url_epInfo'] % (sid, language)
|
url = self.config['url_epInfo'] % (sid, language)
|
||||||
|
|
||||||
epsEt = self._getetsrc(url, language=language)
|
epsEt = self._getetsrc(url, language=language)
|
||||||
|
if 'episode' not in epsEt:
|
||||||
|
return False
|
||||||
|
|
||||||
episodes = epsEt["episode"]
|
episodes = epsEt['episode']
|
||||||
if not isinstance(episodes, list):
|
if not isinstance(episodes, list):
|
||||||
episodes = [episodes]
|
episodes = [episodes]
|
||||||
|
|
||||||
|
|
|
@ -604,6 +604,8 @@ class TVRage:
|
||||||
|
|
||||||
self.config['params_epInfo']['sid'] = sid
|
self.config['params_epInfo']['sid'] = sid
|
||||||
epsEt = self._getetsrc(self.config['url_epInfo'], self.config['params_epInfo'])
|
epsEt = self._getetsrc(self.config['url_epInfo'], self.config['params_epInfo'])
|
||||||
|
if 'episode' not in epsEt:
|
||||||
|
return False
|
||||||
|
|
||||||
seasons = epsEt['episodelist']['season']
|
seasons = epsEt['episodelist']['season']
|
||||||
if not isinstance(seasons, list):
|
if not isinstance(seasons, list):
|
||||||
|
|
Loading…
Reference in a new issue