Add new Live TV art fallback for info page
This commit is contained in:
@@ -36,6 +36,7 @@ DEFAULT_COVER_THUMB = "interfaces/default/images/cover.png"
|
||||
DEFAULT_ART = "interfaces/default/images/art.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_FULL = "interfaces/default/images/art-live-full.png"
|
||||
|
||||
ONLINE_POSTER_THUMB = "https://tautulli.com/images/poster.png"
|
||||
ONLINE_COVER_THUMB = "https://tautulli.com/images/cover.png"
|
||||
@@ -46,7 +47,8 @@ DEFAULT_IMAGES = {
|
||||
'cover': DEFAULT_COVER_THUMB,
|
||||
'art': DEFAULT_ART,
|
||||
'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 = {
|
||||
|
@@ -1249,7 +1249,7 @@ def get_img_info(img=None, rating_key=None, title='', width=1000, height=1500,
|
||||
return img_info
|
||||
|
||||
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)
|
||||
else:
|
||||
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':
|
||||
if fallback == 'cover':
|
||||
w, h = 1000, 1000
|
||||
elif fallback in ('art', 'art-live'):
|
||||
elif fallback and fallback.startswith('art'):
|
||||
w, h = 1920, 1080
|
||||
else:
|
||||
w, h = 1000, 1500
|
||||
@@ -1353,7 +1353,7 @@ def set_hash_image_info(img=None, rating_key=None, width=750, height=1000,
|
||||
return fallback
|
||||
|
||||
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)
|
||||
else:
|
||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||
|
@@ -4072,7 +4072,7 @@ class WebInterface(object):
|
||||
return_hash = (kwargs.get('return_hash') == 'true')
|
||||
|
||||
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)
|
||||
else:
|
||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||
|
Reference in New Issue
Block a user