Fix for _parseactors function in theTVDB Indexer API

This commit is contained in:
echel0n 2014-06-28 14:29:58 -07:00
parent cfbb7678a9
commit f247499289

View file

@ -728,7 +728,9 @@ class Tvdb:
log().debug('Getting season banners for %s' % (sid))
bannersEt = self._getetsrc(self.config['url_seriesBanner'] % (sid))
banners = {}
for cur_banner in bannersEt['banner'] if bannersEt else []:
try:
for cur_banner in bannersEt['banner']:
bid = cur_banner['id']
btype = cur_banner['bannertype']
btype2 = cur_banner['bannertype2']
@ -754,6 +756,8 @@ class Tvdb:
log().debug("Transforming %s to %s" % (k, new_key))
new_url = self.config['url_artworkPrefix'] % (v)
banners[btype][btype2][bid][new_key] = new_url
except:
pass
self._setShowData(sid, "_banners", banners)
@ -785,7 +789,8 @@ class Tvdb:
actorsEt = self._getetsrc(self.config['url_actorsInfo'] % (sid))
cur_actors = Actors()
for curActorItem in actorsEt["actor"] if actorsEt else []:
try:
for curActorItem in actorsEt["actor"]:
curActor = Actor()
for k, v in curActorItem.items():
k = k.lower()
@ -796,6 +801,9 @@ class Tvdb:
v = self._cleanData(v)
curActor[k] = v
cur_actors.append(curActor)
except:
pass
self._setShowData(sid, '_actors', cur_actors)
def _getShowData(self, sid, language, seriesSearch=False):