mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-02 17:33:37 +00:00
Fix for "TypeError: 'NoneType' object is unsubscriptable" in Indexer API code
This commit is contained in:
parent
95e928bfcb
commit
9685696e36
1 changed files with 13 additions and 14 deletions
|
@ -728,7 +728,7 @@ class Tvdb:
|
||||||
log().debug('Getting season banners for %s' % (sid))
|
log().debug('Getting season banners for %s' % (sid))
|
||||||
bannersEt = self._getetsrc(self.config['url_seriesBanner'] % (sid))
|
bannersEt = self._getetsrc(self.config['url_seriesBanner'] % (sid))
|
||||||
banners = {}
|
banners = {}
|
||||||
for cur_banner in bannersEt['banner']:
|
for cur_banner in bannersEt['banner'] if bannersEt else []:
|
||||||
bid = cur_banner['id']
|
bid = cur_banner['id']
|
||||||
btype = cur_banner['bannertype']
|
btype = cur_banner['bannertype']
|
||||||
btype2 = cur_banner['bannertype2']
|
btype2 = cur_banner['bannertype2']
|
||||||
|
@ -785,19 +785,18 @@ class Tvdb:
|
||||||
actorsEt = self._getetsrc(self.config['url_actorsInfo'] % (sid))
|
actorsEt = self._getetsrc(self.config['url_actorsInfo'] % (sid))
|
||||||
|
|
||||||
cur_actors = Actors()
|
cur_actors = Actors()
|
||||||
if actorsEt:
|
for curActorItem in actorsEt["actor"] if actorsEt else []:
|
||||||
for curActorItem in actorsEt["actor"]:
|
curActor = Actor()
|
||||||
curActor = Actor()
|
for k, v in curActorItem.items():
|
||||||
for k, v in curActorItem.items():
|
k = k.lower()
|
||||||
k = k.lower()
|
if v is not None:
|
||||||
if v is not None:
|
if k == "image":
|
||||||
if k == "image":
|
v = self.config['url_artworkPrefix'] % (v)
|
||||||
v = self.config['url_artworkPrefix'] % (v)
|
else:
|
||||||
else:
|
v = self._cleanData(v)
|
||||||
v = self._cleanData(v)
|
curActor[k] = v
|
||||||
curActor[k] = v
|
cur_actors.append(curActor)
|
||||||
cur_actors.append(curActor)
|
self._setShowData(sid, '_actors', cur_actors)
|
||||||
self._setShowData(sid, '_actors', cur_actors)
|
|
||||||
|
|
||||||
def _getShowData(self, sid, language, seriesSearch=False):
|
def _getShowData(self, sid, language, seriesSearch=False):
|
||||||
"""Takes a series ID, gets the epInfo URL and parses the TVDB
|
"""Takes a series ID, gets the epInfo URL and parses the TVDB
|
||||||
|
|
Loading…
Reference in a new issue