mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-22 14:13:40 -07:00
fixes to history iamges / links update
This commit is contained in:
parent
9cd3758d15
commit
4989464420
2 changed files with 18 additions and 14 deletions
|
@ -149,7 +149,7 @@ DOCUMENTATION :: END
|
||||||
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-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', '')}">
|
data-library_art="${row.get('library_art', '')}" data-library_thumb="${row.get('library_thumb', '')}" data-server_id="${row.get('server_id', '')}">
|
||||||
<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'):
|
||||||
|
|
|
@ -427,16 +427,18 @@
|
||||||
if (s.media_type === 'track') {
|
if (s.media_type === 'track') {
|
||||||
// Update if artist changed
|
// Update if artist changed
|
||||||
if (s.grandparent_rating_key !== instance.data('grandparent_rating_key').toString()) {
|
if (s.grandparent_rating_key !== instance.data('grandparent_rating_key').toString()) {
|
||||||
$('#background-' + key).css('background-image', 'url(' + page('pms_image_proxy', s.art, s.rating_key, 500, 280, 40, '282828', 3, 'art', true) + ')');
|
debugger;
|
||||||
|
$('#background-' + key).css('background-image', 'url(' + page('pms_image_proxy', s.art, s.rating_key, 500, 280, 40, '282828', 3, 'art', true, server_id=s.server_id) + ')');
|
||||||
$('#metadata-grandparent_title-' + key)
|
$('#metadata-grandparent_title-' + key)
|
||||||
.attr('href', page('info', s.grandparent_rating_key))
|
.attr('href', page('info', s.grandparent_rating_key, server_id=s.server_id))
|
||||||
.attr('title', s.original_title || s.grandparent_title)
|
.attr('title', s.original_title || s.grandparent_title)
|
||||||
.text(s.original_title || s.grandparent_title);
|
.text(s.original_title || s.grandparent_title);
|
||||||
}
|
}
|
||||||
// Update cover if album changed
|
// Update cover if album changed
|
||||||
if (s.parent_rating_key !== instance.data('parent_rating_key').toString()) {
|
if (s.parent_rating_key !== instance.data('parent_rating_key').toString()) {
|
||||||
$('#poster-' + key).css('background-image', 'url(' + page('pms_image_proxy', s.parent_thumb, s.parent_rating_key, 300, 300, null, null, null, 'poster', true) + ')');
|
debugger;
|
||||||
$('#poster-' + key + '-bg').css('background-image', 'url(' + page('pms_image_proxy', s.parent_thumb, s.parent_rating_key, 300, 300, 60, '282828', 3, 'poster', true) + ')');
|
$('#poster-' + key).css('background-image', 'url(' + page('pms_image_proxy', s.parent_thumb, s.parent_rating_key, 300, 300, null, null, null, 'poster', true, server_id=s.server_id) + ')');
|
||||||
|
$('#poster-' + key + '-bg').css('background-image', 'url(' + page('pms_image_proxy', s.parent_thumb, s.parent_rating_key, 300, 300, 60, '282828', 3, 'poster', true, server_id=s.server_id) + ')');
|
||||||
$('#poster-url-' + key)
|
$('#poster-url-' + key)
|
||||||
.attr('href', page('info', s.parent_rating_key))
|
.attr('href', page('info', s.parent_rating_key))
|
||||||
.attr('title', s.parent_title);
|
.attr('title', s.parent_title);
|
||||||
|
@ -447,6 +449,7 @@
|
||||||
}
|
}
|
||||||
// Update cover if track changed
|
// Update cover if track changed
|
||||||
if (s.rating_key !== instance.data('rating_key').toString()) {
|
if (s.rating_key !== instance.data('rating_key').toString()) {
|
||||||
|
debugger;
|
||||||
$('#metadata-grandparent_title-' + key)
|
$('#metadata-grandparent_title-' + key)
|
||||||
.attr('href', page('info', s.grandparent_rating_key))
|
.attr('href', page('info', s.grandparent_rating_key))
|
||||||
.attr('title', s.original_title || s.grandparent_title)
|
.attr('title', s.original_title || s.grandparent_title)
|
||||||
|
@ -799,21 +802,22 @@
|
||||||
var library_art = $(elem).data('library_art');
|
var library_art = $(elem).data('library_art');
|
||||||
var library_thumb = $(elem).data('library_thumb');
|
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'];
|
||||||
|
var server_id = $(elem).data('server_id');
|
||||||
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'];
|
||||||
} else if (live) {
|
} else if (live) {
|
||||||
[height, fallback_poster, fallback_art] = [450, 'poster-live', 'art-live'];
|
[height, fallback_poster, fallback_art] = [450, 'poster-live', 'art-live'];
|
||||||
}
|
}
|
||||||
var href = '#';
|
var href = '#';
|
||||||
|
debugger;
|
||||||
if (stat_id === 'most_concurrent') {
|
if (stat_id === 'most_concurrent') {
|
||||||
return
|
return
|
||||||
} else if (stat_id === 'top_libraries') {
|
} 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, 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, null, null, null,server_id) + ')');
|
||||||
$('#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 (library_thumb.startsWith('http')) {
|
if (library_thumb.startsWith('http')) {
|
||||||
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', library_thumb, null, 100, 100, 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', null, null, null,server_id) + ')');
|
||||||
} 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);
|
||||||
|
@ -835,19 +839,19 @@
|
||||||
} else {
|
} else {
|
||||||
if (rating_key) {
|
if (rating_key) {
|
||||||
if (live) {
|
if (live) {
|
||||||
href = page('info', rating_key, guid, true, live);
|
href = page('info', rating_key, guid, true, live, server_id);
|
||||||
} else {
|
} else {
|
||||||
href = page('info', rating_key);
|
href = page('info', rating_key, null, null, null, server_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var img_rating_key = grandparent_rating_key || rating_key;
|
var img_rating_key = grandparent_rating_key || rating_key;
|
||||||
$('#stats-thumb-url-' + stat_id).attr('href', href).prop('title', $(elem).data('title'));
|
$('#stats-thumb-url-' + stat_id).attr('href', href).prop('title', $(elem).data('title'));
|
||||||
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art, img_rating_key, 500, 280, 40, '282828', 3, fallback_art) + ')');
|
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art, img_rating_key, 500, 280, 40, '282828', 3, fallback_art, null, null, null,server_id) + ')');
|
||||||
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, img_rating_key, 300, height, null, null, null, fallback_poster) + ')');
|
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, img_rating_key, 300, height, null, null, null, fallback_poster, null, null, null, server_id) + ')');
|
||||||
$('#stats-thumb-' + stat_id + '-bg').css('background-image', 'url(' + page('pms_image_proxy', thumb, img_rating_key, 300, height, 60, '282828', 3, fallback_poster) + ')');
|
$('#stats-thumb-' + stat_id + '-bg').css('background-image', 'url(' + page('pms_image_proxy', thumb, img_rating_key, 300, height, 60, '282828', 3, fallback_poster, null, null, null, server_id) + ')');
|
||||||
$('#library-stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art || library_art, img_rating_key, 500, 280, 40, '282828', 3, library_art || fallback_art) + ')');
|
$('#library-stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art || library_art, img_rating_key, 500, 280, 40, '282828', 3, library_art || fallback_art) + ')');
|
||||||
if (thumb.startsWith('http')) {
|
if (thumb.startsWith('http')) {
|
||||||
$('#library-stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, img_rating_key, 300, 300, null, null, null, 'cover') + ')')
|
$('#library-stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, img_rating_key, 300, 300, null, null, null, 'cover', null, null, null, server_id) + ')')
|
||||||
.removeClass('svg-icon library-' + stat_id);
|
.removeClass('svg-icon library-' + stat_id);
|
||||||
} else {
|
} else {
|
||||||
$('#library-stats-thumb-' + stat_id).css('background-image', '')
|
$('#library-stats-thumb-' + stat_id).css('background-image', '')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue