mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -07:00
Fix current activity artwork for tracks
This commit is contained in:
parent
49833b3c51
commit
150453bff3
3 changed files with 17 additions and 7 deletions
|
@ -570,6 +570,10 @@ a .users-poster-face:hover {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
#dashboard-checking-activity,
|
||||||
|
#dashboard-no-activity {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
.dashboard-instance {
|
.dashboard-instance {
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -60,6 +60,10 @@ DOCUMENTATION :: END
|
||||||
</%doc>
|
</%doc>
|
||||||
|
|
||||||
% if data is not None:
|
% if data is not None:
|
||||||
|
<%
|
||||||
|
from plexpy import helpers
|
||||||
|
data['indexes'] = helpers.cast_to_int(data['indexes'])
|
||||||
|
%>
|
||||||
<div class="dashboard-instance" id="instance-${data['session_key']}" data-id="${data['session_key']}">
|
<div class="dashboard-instance" id="instance-${data['session_key']}" data-id="${data['session_key']}">
|
||||||
<div class="dashboard-hover-container">
|
<div class="dashboard-hover-container">
|
||||||
% if (data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track') and data['rating_key']:
|
% if (data['media_type'] == 'movie' or data['media_type'] == 'episode' or data['media_type'] == 'track') and data['rating_key']:
|
||||||
|
@ -80,9 +84,9 @@ DOCUMENTATION :: END
|
||||||
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
% elif data['media_type'] == 'clip':
|
% elif data['media_type'] == 'clip':
|
||||||
% if data['art'][:4] == 'http':
|
% if data['art'].startswith('http'):
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
|
||||||
% elif data['thumb'][:4] == 'http':
|
% elif data['thumb'].startswith('http'):
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
||||||
% else:
|
% else:
|
||||||
% if data['art']:
|
% if data['art']:
|
||||||
|
@ -92,7 +96,7 @@ DOCUMENTATION :: END
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
% elif data['media_type'] == 'photo':
|
% elif data['media_type'] == 'photo':
|
||||||
<div class="dashboard-activity-poster-face bif" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=cover);"></div>
|
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=cover);"></div>
|
||||||
% else:
|
% else:
|
||||||
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="currentActivity">
|
<div id="currentActivity">
|
||||||
<div class="text-muted" id="dashboard-checking-activity"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>
|
<div class="text-muted" id="dashboard-checking-activity"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>
|
||||||
<br>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -108,7 +107,6 @@
|
||||||
$('#dashboard-checking-activity').remove();
|
$('#dashboard-checking-activity').remove();
|
||||||
|
|
||||||
var current_activity = $.parseJSON(xhr.responseText);
|
var current_activity = $.parseJSON(xhr.responseText);
|
||||||
console.log(current_activity)
|
|
||||||
var stream_count = parseInt(current_activity.stream_count);
|
var stream_count = parseInt(current_activity.stream_count);
|
||||||
var sessions = current_activity.sessions;
|
var sessions = current_activity.sessions;
|
||||||
|
|
||||||
|
@ -147,7 +145,7 @@
|
||||||
$('#play-state-' + key).html(state_icon);
|
$('#play-state-' + key).html(state_icon);
|
||||||
|
|
||||||
// if using bif indexes, update the bif thumbnail
|
// if using bif indexes, update the bif thumbnail
|
||||||
if (s.indexes == 1) {
|
if (s.indexes) {
|
||||||
var bif_poster = $('#bif-' + key);
|
var bif_poster = $('#bif-' + key);
|
||||||
bif_poster.animate({ opacity: 0 }, { duration: 1000, queue: false });
|
bif_poster.animate({ opacity: 0 }, { duration: 1000, queue: false });
|
||||||
bif_poster.after($('<div id="bif-' + key + '"class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img='
|
bif_poster.after($('<div id="bif-' + key + '"class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img='
|
||||||
|
@ -184,7 +182,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted" style="margin-bottom: 20px;">Nothing is currently being played.</div>');
|
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">Nothing is currently being played.</div>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -216,6 +214,10 @@
|
||||||
$('#currentActivity').on('click', '.btn-activity-info', function (e) {
|
$('#currentActivity').on('click', '.btn-activity-info', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$($(this).attr('data-target')).toggle();
|
$($(this).attr('data-target')).toggle();
|
||||||
|
var id = $(this).closest('.dashboard-instance').data('id');
|
||||||
|
var filterVal = $('#stream-' + id).is(':visible') ? 'blur(5px)' : '';
|
||||||
|
$($(this).closest('.dashboard-activity-poster').find('.dashboard-activity-poster-face, .dashboard-activity-cover-face'))
|
||||||
|
.css('filter',filterVal).css('webkitFilter',filterVal).css('mozFilter',filterVal).css('oFilter',filterVal).css('msFilter',filterVal);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add hover class to dashboard-instance
|
// Add hover class to dashboard-instance
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue