mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Merge pull request #1389 from herby2212/nightly
Add most active libraries card and total plays to home stats
This commit is contained in:
commit
3dd9dfa48b
6 changed files with 105 additions and 4 deletions
|
@ -783,6 +783,7 @@
|
|||
var art = $(elem).data('art');
|
||||
var thumb = $(elem).data('thumb');
|
||||
var user_id = $(elem).data('user_id');
|
||||
var library_type = $(elem).data('library-type');
|
||||
var user_thumb = $(elem).data('user_thumb');
|
||||
var rating_key = $(elem).data('rating_key');
|
||||
var guid = $(elem).data('guid');
|
||||
|
@ -810,6 +811,16 @@
|
|||
$('#stats-background-' + stat_id).removeClass(function (index, className) {
|
||||
return (className.match (/(^|\s)platform-\S+/g) || []).join(' ');
|
||||
}).addClass('platform-' + $(elem).data('platform') + '-rgba');
|
||||
} else if (stat_id === 'top_libraries') {
|
||||
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', 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')) {
|
||||
$('#stats-thumb-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', thumb, null, 300, 300, null, null, null, 'cover') + ')');
|
||||
} else {
|
||||
$('#stats-thumb-' + stat_id).css('background-image', '')
|
||||
.addClass('svg-icon library-' + library_type);
|
||||
}
|
||||
} else {
|
||||
if (rating_key) {
|
||||
if (live) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue