aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-11-30 21:17:18 -0500
committermorpheus65535 <[email protected]>2021-11-30 21:17:18 -0500
commit9b273a7a8976f63ff932c1a0cb0be38a98956d05 (patch)
treed8593f861f7ee36dabaac6fbdf3a6b32f1ff16bd
parent247f69c210531048186c699de240f5e860ef0b3f (diff)
downloadbazarr-9b273a7a8976f63ff932c1a0cb0be38a98956d05.tar.gz
bazarr-9b273a7a8976f63ff932c1a0cb0be38a98956d05.zip
Fixed missing poster or fanart url from raising an exception when rendering UI.
-rw-r--r--bazarr/api.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bazarr/api.py b/bazarr/api.py
index 97ea20c4a..d5522a8d0 100644
--- a/bazarr/api.py
+++ b/bazarr/api.py
@@ -141,11 +141,11 @@ def postprocessSeries(item):
# map poster and fanart to server proxy
if 'poster' in item:
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:
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):
@@ -280,11 +280,11 @@ def postprocessMovie(item):
# map poster and fanart to server proxy
if 'poster' in item:
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:
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):