mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-04 05:52:24 +08:00
Fixed missing poster or fanart url from raising an exception when rendering UI.
This commit is contained in:
parent
247f69c210
commit
9b273a7a89
1 changed files with 4 additions and 4 deletions
|
@ -141,11 +141,11 @@ def postprocessSeries(item):
|
||||||
# map poster and fanart to server proxy
|
# map poster and fanart to server proxy
|
||||||
if 'poster' in item:
|
if 'poster' in item:
|
||||||
poster = item['poster']
|
poster = item['poster']
|
||||||
item['poster'] = f"{base_url}/images/series{poster}"
|
item['poster'] = f"{base_url}/images/series{poster}" if poster else None
|
||||||
|
|
||||||
if 'fanart' in item:
|
if 'fanart' in item:
|
||||||
fanart = item['fanart']
|
fanart = item['fanart']
|
||||||
item['fanart'] = f"{base_url}/images/series{fanart}"
|
item['fanart'] = f"{base_url}/images/series{fanart}" if fanart else None
|
||||||
|
|
||||||
|
|
||||||
def postprocessEpisode(item):
|
def postprocessEpisode(item):
|
||||||
|
@ -280,11 +280,11 @@ def postprocessMovie(item):
|
||||||
# map poster and fanart to server proxy
|
# map poster and fanart to server proxy
|
||||||
if 'poster' in item:
|
if 'poster' in item:
|
||||||
poster = item['poster']
|
poster = item['poster']
|
||||||
item['poster'] = f"{base_url}/images/movies{poster}"
|
item['poster'] = f"{base_url}/images/movies{poster}" if poster else None
|
||||||
|
|
||||||
if 'fanart' in item:
|
if 'fanart' in item:
|
||||||
fanart = item['fanart']
|
fanart = item['fanart']
|
||||||
item['fanart'] = f"{base_url}/images/movies{fanart}"
|
item['fanart'] = f"{base_url}/images/movies{fanart}" if fanart else None
|
||||||
|
|
||||||
|
|
||||||
class SystemAccount(Resource):
|
class SystemAccount(Resource):
|
||||||
|
|
Loading…
Reference in a new issue