mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Fix for index out of range issues
This commit is contained in:
parent
5ef7a0fb30
commit
2893b3331e
@ -965,16 +965,17 @@ class GenericMetadata():
|
||||
return None
|
||||
|
||||
images = result.images()
|
||||
# get backdrop urls
|
||||
if backdrop:
|
||||
rel_path = images['backdrops'][0]['file_path']
|
||||
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
||||
return url
|
||||
if len(images) > 0:
|
||||
# get backdrop urls
|
||||
if backdrop:
|
||||
rel_path = images['backdrops'][0]['file_path']
|
||||
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
||||
return url
|
||||
|
||||
# get poster urls
|
||||
if poster:
|
||||
rel_path = images['posters'][0]['file_path']
|
||||
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
||||
return url
|
||||
# get poster urls
|
||||
if poster:
|
||||
rel_path = images['posters'][0]['file_path']
|
||||
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
||||
return url
|
||||
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user