mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-22 01:23:43 +00:00
Fix for index out of range issues
This commit is contained in:
parent
5ef7a0fb30
commit
2893b3331e
1 changed files with 11 additions and 10 deletions
|
@ -965,16 +965,17 @@ class GenericMetadata():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
images = result.images()
|
images = result.images()
|
||||||
# get backdrop urls
|
if len(images) > 0:
|
||||||
if backdrop:
|
# get backdrop urls
|
||||||
rel_path = images['backdrops'][0]['file_path']
|
if backdrop:
|
||||||
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
rel_path = images['backdrops'][0]['file_path']
|
||||||
return url
|
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
||||||
|
return url
|
||||||
|
|
||||||
# get poster urls
|
# get poster urls
|
||||||
if poster:
|
if poster:
|
||||||
rel_path = images['posters'][0]['file_path']
|
rel_path = images['posters'][0]['file_path']
|
||||||
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
url = "{0}{1}{2}".format(base_url, max_size, rel_path)
|
||||||
return url
|
return url
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in a new issue