mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Fix live tv thumb and art for top libraries statistics card
This commit is contained in:
parent
fa8b51bfd9
commit
2921c1fc30
3 changed files with 6 additions and 3 deletions
|
@ -77,7 +77,8 @@ DOCUMENTATION :: END
|
|||
<% fallback = 'art-live' if row0['live'] else 'art' %>
|
||||
<div id="stats-background-${stat_id}" class="dashboard-stats-background" style="background-image: url(${page('pms_image_proxy', row0['art'], row0['rating_key'], 500, 280, 40, '282828', 3, fallback=fallback)});">
|
||||
% elif stat_id == 'top_libraries':
|
||||
<div id="stats-background-${stat_id}" class="dashboard-stats-background" style="background-image: url(${page('pms_image_proxy', row0['art'] or row0['library_art'], None, 500, 280, 40, '282828', 3, fallback=row0['library_art'])});" data-library_art="${row0['library_art']}">
|
||||
<% fallback = 'art-live' if row0['live'] else row0['library_art'] %>
|
||||
<div id="stats-background-${stat_id}" class="dashboard-stats-background" style="background-image: url(${page('pms_image_proxy', row0['art'] or row0['library_art'], None, 500, 280, 40, '282828', 3, fallback=fallback)});" data-library_art="${row0['library_art']}">
|
||||
% elif stat_id == 'top_users':
|
||||
<div id="stats-background-${stat_id}" class="dashboard-stats-background" data-blurhash="${page('pms_image_proxy', row0['user_thumb'] or 'interfaces/default/images/gravatar-default.png', None, 100, 100, 40, '282828', 0, fallback='user')}">
|
||||
% elif stat_id == 'top_platforms':
|
||||
|
@ -110,7 +111,7 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
% elif stat_id == 'top_libraries':
|
||||
% if row0['thumb'].startswith('http'):
|
||||
<div id="stats-thumb-${stat_id}" class="dashboard-stats-flat hidden-xs" style="background-image: url(${page('pms_image_proxy', row0['thumb'], None, 80, 80)});"></div>
|
||||
<div id="stats-thumb-${stat_id}" class="dashboard-stats-flat hidden-xs" style="background-image: url(${page('pms_image_proxy', row0['library_thumb'], None, 80, 80)});"></div>
|
||||
% else:
|
||||
<div id="stats-thumb-${stat_id}" class="dashboard-stats-flat svg-icon library-${row0['section_type']} hidden-xs"></div>
|
||||
% endif
|
||||
|
|
|
@ -809,7 +809,7 @@
|
|||
if (stat_id === 'most_concurrent') {
|
||||
return
|
||||
} else if (stat_id === 'top_libraries') {
|
||||
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art || library_art, null, 500, 280, 40, '282828', 3, library_art || fallback_art) + ')');
|
||||
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art || library_art, null, 500, 280, 40, '282828', 3, fallback_art) + ')');
|
||||
$('#stats-thumb-' + stat_id).removeClass(function (index, className) {
|
||||
return (className.match (/(^|\s)svg-icon library-\S+/g) || []).join(' ')});
|
||||
if (thumb.startsWith('http')) {
|
||||
|
|
|
@ -743,6 +743,8 @@ class DataFactory(object):
|
|||
|
||||
if item['custom_art'] and item['custom_art'] != item['library_art']:
|
||||
library_art = item['custom_art']
|
||||
elif item['library_art'] == common.DEFAULT_LIVE_TV_ART_FULL:
|
||||
library_art = common.DEFAULT_LIVE_TV_ART
|
||||
else:
|
||||
library_art = item['library_art']
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue