Fallback pms_image_proxy when no image imput received

This commit is contained in:
JonnyWong16 2020-02-16 20:06:35 -08:00
parent 66a0f953b3
commit 73f8f83658
2 changed files with 5 additions and 2 deletions

View file

@ -4047,6 +4047,10 @@ class WebInterface(object):
```
"""
if not img and not rating_key:
if fallback in common.DEFAULT_IMAGES:
fbi = common.DEFAULT_IMAGES[fallback]
fp = os.path.join(plexpy.PROG_DIR, 'data', fbi)
return serve_file(path=fp, content_type='image/png')
logger.warn('No image input received.')
return