mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Fixed for Fanart.TV API when indexerid is 0
This commit is contained in:
parent
7e8b27fcd3
commit
ef9334fa6a
@ -1011,17 +1011,18 @@ class GenericMetadata():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
indexerid = helpers.mapIndexersToShow(show)[1]
|
indexerid = helpers.mapIndexersToShow(show)[1]
|
||||||
request = Request(
|
if indexerid:
|
||||||
apikey=sickbeard.FANART_API_KEY,
|
request = Request(
|
||||||
id=indexerid,
|
apikey=sickbeard.FANART_API_KEY,
|
||||||
ws=fanart.WS.TV,
|
id=indexerid,
|
||||||
type=types[type],
|
ws=fanart.WS.TV,
|
||||||
sort=fanart.SORT.POPULAR,
|
type=types[type],
|
||||||
limit=fanart.LIMIT.ONE,
|
sort=fanart.SORT.POPULAR,
|
||||||
)
|
limit=fanart.LIMIT.ONE,
|
||||||
|
)
|
||||||
|
|
||||||
resp = request.response()
|
resp = request.response()
|
||||||
return resp.values()[-1].values()[-2][-1]['url']
|
return resp.values()[-1].values()[-2][-1]['url']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user