mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Fallback pms_image_proxy when no image imput received
This commit is contained in:
parent
66a0f953b3
commit
73f8f83658
2 changed files with 5 additions and 2 deletions
|
@ -80,8 +80,7 @@ DOCUMENTATION :: END
|
||||||
<div class="dashboard-activity-container">
|
<div class="dashboard-activity-container">
|
||||||
<%
|
<%
|
||||||
if data['live']:
|
if data['live']:
|
||||||
art = ('img=' + data['art']) if data['art'] else ('rating_key=' + data['rating_key'])
|
background_url = 'pms_image_proxy?img=' + data['art'] + '&width=500&height=280&opacity=40&background=282828&blur=3&fallback=art-live&refresh=true'
|
||||||
background_url = 'pms_image_proxy?' + art + '&width=500&height=280&opacity=40&background=282828&blur=3&fallback=art-live&refresh=true'
|
|
||||||
elif data['channel_stream'] == 0:
|
elif data['channel_stream'] == 0:
|
||||||
background_url = 'pms_image_proxy?img=' + data['art'] + '&width=500&height=280&opacity=40&background=282828&blur=3&fallback=art&refresh=true'
|
background_url = 'pms_image_proxy?img=' + data['art'] + '&width=500&height=280&opacity=40&background=282828&blur=3&fallback=art&refresh=true'
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -4047,6 +4047,10 @@ class WebInterface(object):
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
if not img and not rating_key:
|
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.')
|
logger.warn('No image input received.')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue