1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 03:22:22 -05:00

Fixed for Fanart.TV API when indexerid is 0

This commit is contained in:
echel0n 2014-12-20 09:13:56 -08:00
parent 7e8b27fcd3
commit ef9334fa6a

View File

@ -1011,17 +1011,18 @@ class GenericMetadata():
try:
indexerid = helpers.mapIndexersToShow(show)[1]
request = Request(
apikey=sickbeard.FANART_API_KEY,
id=indexerid,
ws=fanart.WS.TV,
type=types[type],
sort=fanart.SORT.POPULAR,
limit=fanart.LIMIT.ONE,
)
if indexerid:
request = Request(
apikey=sickbeard.FANART_API_KEY,
id=indexerid,
ws=fanart.WS.TV,
type=types[type],
sort=fanart.SORT.POPULAR,
limit=fanart.LIMIT.ONE,
)
resp = request.response()
return resp.values()[-1].values()[-2][-1]['url']
resp = request.response()
return resp.values()[-1].values()[-2][-1]['url']
except Exception as e:
pass