mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-29 19:18:33 -07:00
Fix live tv thumb hover on top libraries statistics card
This commit is contained in:
parent
07715c6a49
commit
14648a4604
2 changed files with 7 additions and 5 deletions
|
@ -110,8 +110,8 @@ DOCUMENTATION :: END
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
% elif stat_id == 'top_libraries':
|
% elif stat_id == 'top_libraries':
|
||||||
% if row0['thumb'].startswith('http'):
|
% if row0['library_thumb'].startswith('http'):
|
||||||
<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>
|
<div id="stats-thumb-${stat_id}" class="dashboard-stats-flat hidden-xs" style="background-image: url(${page('pms_image_proxy', row0['library_thumb'], None, 100, 100, fallback='cover')});"></div>
|
||||||
% else:
|
% else:
|
||||||
<div id="stats-thumb-${stat_id}" class="dashboard-stats-flat svg-icon library-${row0['section_type']} hidden-xs"></div>
|
<div id="stats-thumb-${stat_id}" class="dashboard-stats-flat svg-icon library-${row0['section_type']} hidden-xs"></div>
|
||||||
% endif
|
% endif
|
||||||
|
@ -148,7 +148,8 @@ DOCUMENTATION :: END
|
||||||
data-rating_key="${row.get('rating_key')}" data-grandparent_rating_key="${row.get('grandparent_rating_key')}" data-guid="${row.get('guid')}" data-title="${row.get('title')}"
|
data-rating_key="${row.get('rating_key')}" data-grandparent_rating_key="${row.get('grandparent_rating_key')}" data-guid="${row.get('guid')}" data-title="${row.get('title')}"
|
||||||
data-art="${row.get('art')}" data-thumb="${row.get('thumb')}" data-platform="${row.get('platform_name')}" data-library-type="${row.get('section_type')}"
|
data-art="${row.get('art')}" data-thumb="${row.get('thumb')}" data-platform="${row.get('platform_name')}" data-library-type="${row.get('section_type')}"
|
||||||
data-user_id="${row.get('user_id')}" data-user="${row.get('user')}" data-friendly_name="${row.get('friendly_name')}" data-user_thumb="${row.get('user_thumb')}"
|
data-user_id="${row.get('user_id')}" data-user="${row.get('user')}" data-friendly_name="${row.get('friendly_name')}" data-user_thumb="${row.get('user_thumb')}"
|
||||||
data-last_watch="${row.get('last_watch')}" data-started="${row.get('started')}" data-live="${row.get('live')}" data-library_art="${row.get('library_art', '')}">
|
data-last_watch="${row.get('last_watch')}" data-started="${row.get('started')}" data-live="${row.get('live')}"
|
||||||
|
data-library_art="${row.get('library_art', '')}" data-library_thumb="${row.get('library_thumb', '')}">
|
||||||
<div class="sub-list">${loop.index + 1}</div>
|
<div class="sub-list">${loop.index + 1}</div>
|
||||||
<div class="sub-value">
|
<div class="sub-value">
|
||||||
% if stat_id in ('top_movies', 'popular_movies', 'top_tv', 'popular_tv', 'top_music', 'popular_music', 'last_watched'):
|
% if stat_id in ('top_movies', 'popular_movies', 'top_tv', 'popular_tv', 'top_music', 'popular_music', 'last_watched'):
|
||||||
|
|
|
@ -798,6 +798,7 @@
|
||||||
var guid = $(elem).data('guid');
|
var guid = $(elem).data('guid');
|
||||||
var live = $(elem).data('live');
|
var live = $(elem).data('live');
|
||||||
var library_art = $(elem).data('library_art');
|
var library_art = $(elem).data('library_art');
|
||||||
|
var library_thumb = $(elem).data('library_thumb');
|
||||||
var [height, fallback_poster, fallback_art] = [450, 'poster', 'art'];
|
var [height, fallback_poster, fallback_art] = [450, 'poster', 'art'];
|
||||||
if ($.inArray(stat_id, ['top_music', 'popular_music']) > -1) {
|
if ($.inArray(stat_id, ['top_music', 'popular_music']) > -1) {
|
||||||
[height, fallback_poster, fallback_art] = [300, 'cover', 'art'];
|
[height, fallback_poster, fallback_art] = [300, 'cover', 'art'];
|
||||||
|
@ -812,8 +813,8 @@
|
||||||
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art || library_art, null, 500, 280, 40, '282828', 3, 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) {
|
$('#stats-thumb-' + stat_id).removeClass(function (index, className) {
|
||||||
return (className.match (/(^|\s)svg-icon library-\S+/g) || []).join(' ')});
|
return (className.match (/(^|\s)svg-icon library-\S+/g) || []).join(' ')});
|
||||||
if (thumb.startsWith('http')) {
|
if (library_thumb.startsWith('http')) {
|
||||||
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, null, 300, 300, null, null, null, 'cover') + ')');
|
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', library_thumb, null, 100, 100, null, null, null, 'cover') + ')');
|
||||||
} else {
|
} else {
|
||||||
$('#stats-thumb-' + stat_id).css('background-image', '')
|
$('#stats-thumb-' + stat_id).css('background-image', '')
|
||||||
.addClass('svg-icon library-' + library_type);
|
.addClass('svg-icon library-' + library_type);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue