mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Fix Live TV artwork on activity card
This commit is contained in:
parent
ca55900d40
commit
d0cd2672dd
4 changed files with 12 additions and 13 deletions
|
@ -80,7 +80,8 @@ DOCUMENTATION :: END
|
|||
<div class="dashboard-activity-container">
|
||||
<%
|
||||
if data['live']:
|
||||
background_url = 'pms_image_proxy?img=' + data['art'] + '&width=500&height=280&opacity=40&background=282828&blur=3&fallback=art-live&refresh=true'
|
||||
art = ('img=' + data['art']) if data['art'] else ('rating_key=' + data['rating_key'])
|
||||
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:
|
||||
background_url = 'pms_image_proxy?img=' + data['art'] + '&width=500&height=280&opacity=40&background=282828&blur=3&fallback=art&refresh=true'
|
||||
else:
|
||||
|
@ -348,7 +349,7 @@ DOCUMENTATION :: END
|
|||
% if data['media_type'] != 'photo':
|
||||
<div class="dashboard-activity-info-time">
|
||||
% if data['live']:
|
||||
<br />Live
|
||||
<br />${data['channel_call_sign']} ${data['channel_identifier']}
|
||||
% elif data['view_offset']:
|
||||
ETA:
|
||||
<span id="stream-eta-${sk}">
|
||||
|
@ -437,7 +438,7 @@ DOCUMENTATION :: END
|
|||
<div class="dashboard-activity-metadata-subtitle-container">
|
||||
% if data['live']:
|
||||
<div id="media-type-${sk}" class="dashboard-activity-metadata-media_type-icon" title="Live TV">
|
||||
<i class="fa fa-fw broadcast-tower"></i>
|
||||
<i class="fa fa-fw fa-broadcast-tower"></i>
|
||||
</div>
|
||||
% elif data['channel_stream'] == 0:
|
||||
<div id="media-type-${sk}" class="dashboard-activity-metadata-media_type-icon" title="${data['media_type'].capitalize()}">
|
||||
|
@ -463,16 +464,14 @@ DOCUMENTATION :: END
|
|||
% if data['media_type'] == 'movie':
|
||||
<span title="${data['year']}" class="sub-heading">${data['year']}</span>
|
||||
% elif data['media_type'] == 'episode':
|
||||
% if data['media_index']:
|
||||
<a href="${href}" title="Season ${data['parent_media_index']}" class="sub-heading">S${data['parent_media_index']}</a>
|
||||
· <a href="${href}" title="Episode ${data['media_index']}" class="sub-heading">E${data['media_index']}</a>
|
||||
% endif
|
||||
<span title="Live TV" class="sub-heading">Live TV</span>
|
||||
% else:
|
||||
<span title="Live TV" class="sub-heading">Live TV</span>
|
||||
% endif
|
||||
% if data['channel_identifier']:
|
||||
<span class="thumb-tooltip" data-toggle="popover" data-img="${data['channel_thumb']}" data-height="40" data-width="40">
|
||||
<span title="${data['channel_call_sign']} ${data['channel_identifier']}" class="sub-heading">(${data['channel_call_sign']} ${data['channel_identifier']})</span>
|
||||
</span>
|
||||
% endif
|
||||
% elif data['channel_stream'] == 0:
|
||||
% if data['media_type'] == 'movie':
|
||||
<span title="${data['year']}" class="sub-heading">${data['year']}</span>
|
||||
|
|
|
@ -46,7 +46,7 @@ DEFAULT_IMAGES = {
|
|||
'cover': DEFAULT_COVER_THUMB,
|
||||
'art': DEFAULT_ART,
|
||||
'poster-live': DEFAULT_LIVE_TV_POSTER_THUMB,
|
||||
'poster-art': DEFAULT_LIVE_TV_ART
|
||||
'art-live': DEFAULT_LIVE_TV_ART
|
||||
}
|
||||
|
||||
MEDIA_TYPE_HEADERS = {
|
||||
|
|
|
@ -1246,7 +1246,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 == 'art':
|
||||
if fallback in ('art', 'art-live'):
|
||||
img = '/library/metadata/{}/art'.format(rating_key)
|
||||
else:
|
||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||
|
@ -1263,7 +1263,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 == 'art':
|
||||
elif fallback in ('art', 'art-live'):
|
||||
w, h = 1920, 1080
|
||||
else:
|
||||
w, h = 1000, 1500
|
||||
|
@ -1347,7 +1347,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 == 'art':
|
||||
if fallback in ('art', 'art-live'):
|
||||
img = '/library/metadata/{}/art'.format(rating_key)
|
||||
else:
|
||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||
|
|
|
@ -4053,7 +4053,7 @@ class WebInterface(object):
|
|||
return_hash = (kwargs.get('return_hash') == 'true')
|
||||
|
||||
if rating_key and not img:
|
||||
if fallback == 'art':
|
||||
if fallback in ('art', 'art-live'):
|
||||
img = '/library/metadata/{}/art'.format(rating_key)
|
||||
else:
|
||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue