mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add new Live TV art fallback for info page
This commit is contained in:
parent
2c45de1fe5
commit
22a6bae4cf
5 changed files with 9 additions and 6 deletions
BIN
data/interfaces/default/images/art-live-full.png
Normal file
BIN
data/interfaces/default/images/art-live-full.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 786 KiB |
|
@ -77,7 +77,8 @@ DOCUMENTATION :: END
|
||||||
%>
|
%>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="art-face" style="background-image:url(${page('pms_image_proxy', data['art'], data['rating_key'], 1920, 1080)})"></div>
|
<% fallback = 'art-live-full' if data['live'] else None %>
|
||||||
|
<div class="art-face" style="background-image:url(${page('pms_image_proxy', data['art'], data['rating_key'], 1920, 1080, fallback=fallback)})"></div>
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<span class="overlay-refresh-image info-art" title="Refresh background image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
<span class="overlay-refresh-image info-art" title="Refresh background image"><i class="fa fa-refresh refresh_pms_image"></i></span>
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -36,6 +36,7 @@ DEFAULT_COVER_THUMB = "interfaces/default/images/cover.png"
|
||||||
DEFAULT_ART = "interfaces/default/images/art.png"
|
DEFAULT_ART = "interfaces/default/images/art.png"
|
||||||
DEFAULT_LIVE_TV_POSTER_THUMB = "interfaces/default/images/poster-live.png"
|
DEFAULT_LIVE_TV_POSTER_THUMB = "interfaces/default/images/poster-live.png"
|
||||||
DEFAULT_LIVE_TV_ART = "interfaces/default/images/art-live.png"
|
DEFAULT_LIVE_TV_ART = "interfaces/default/images/art-live.png"
|
||||||
|
DEFAULT_LIVE_TV_ART_FULL = "interfaces/default/images/art-live-full.png"
|
||||||
|
|
||||||
ONLINE_POSTER_THUMB = "https://tautulli.com/images/poster.png"
|
ONLINE_POSTER_THUMB = "https://tautulli.com/images/poster.png"
|
||||||
ONLINE_COVER_THUMB = "https://tautulli.com/images/cover.png"
|
ONLINE_COVER_THUMB = "https://tautulli.com/images/cover.png"
|
||||||
|
@ -46,7 +47,8 @@ DEFAULT_IMAGES = {
|
||||||
'cover': DEFAULT_COVER_THUMB,
|
'cover': DEFAULT_COVER_THUMB,
|
||||||
'art': DEFAULT_ART,
|
'art': DEFAULT_ART,
|
||||||
'poster-live': DEFAULT_LIVE_TV_POSTER_THUMB,
|
'poster-live': DEFAULT_LIVE_TV_POSTER_THUMB,
|
||||||
'art-live': DEFAULT_LIVE_TV_ART
|
'art-live': DEFAULT_LIVE_TV_ART,
|
||||||
|
'art-live-full': DEFAULT_LIVE_TV_ART_FULL
|
||||||
}
|
}
|
||||||
|
|
||||||
MEDIA_TYPE_HEADERS = {
|
MEDIA_TYPE_HEADERS = {
|
||||||
|
|
|
@ -1249,7 +1249,7 @@ def get_img_info(img=None, rating_key=None, title='', width=1000, height=1500,
|
||||||
return img_info
|
return img_info
|
||||||
|
|
||||||
if rating_key and not img:
|
if rating_key and not img:
|
||||||
if fallback in ('art', 'art-live'):
|
if fallback and fallback.startswith('art'):
|
||||||
img = '/library/metadata/{}/art'.format(rating_key)
|
img = '/library/metadata/{}/art'.format(rating_key)
|
||||||
else:
|
else:
|
||||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||||
|
@ -1269,7 +1269,7 @@ def get_img_info(img=None, rating_key=None, title='', width=1000, height=1500,
|
||||||
elif service == 'cloudinary':
|
elif service == 'cloudinary':
|
||||||
if fallback == 'cover':
|
if fallback == 'cover':
|
||||||
w, h = 1000, 1000
|
w, h = 1000, 1000
|
||||||
elif fallback in ('art', 'art-live'):
|
elif fallback and fallback.startswith('art'):
|
||||||
w, h = 1920, 1080
|
w, h = 1920, 1080
|
||||||
else:
|
else:
|
||||||
w, h = 1000, 1500
|
w, h = 1000, 1500
|
||||||
|
@ -1353,7 +1353,7 @@ def set_hash_image_info(img=None, rating_key=None, width=750, height=1000,
|
||||||
return fallback
|
return fallback
|
||||||
|
|
||||||
if rating_key and not img:
|
if rating_key and not img:
|
||||||
if fallback in ('art', 'art-live'):
|
if fallback and fallback.startswith('art'):
|
||||||
img = '/library/metadata/{}/art'.format(rating_key)
|
img = '/library/metadata/{}/art'.format(rating_key)
|
||||||
else:
|
else:
|
||||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||||
|
|
|
@ -4072,7 +4072,7 @@ class WebInterface(object):
|
||||||
return_hash = (kwargs.get('return_hash') == 'true')
|
return_hash = (kwargs.get('return_hash') == 'true')
|
||||||
|
|
||||||
if rating_key and not img:
|
if rating_key and not img:
|
||||||
if fallback in ('art', 'art-live'):
|
if fallback and fallback.startswith('art'):
|
||||||
img = '/library/metadata/{}/art'.format(rating_key)
|
img = '/library/metadata/{}/art'.format(rating_key)
|
||||||
else:
|
else:
|
||||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue