mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 10:36:57 -07:00
Add identifying playback of synced items
This commit is contained in:
parent
3f668ae5c6
commit
e1dc299cba
4 changed files with 61 additions and 35 deletions
|
@ -92,10 +92,14 @@ DOCUMENTATION :: END
|
|||
rating_key = data['grandparent_rating_key']
|
||||
title = data['grandparent_title']
|
||||
thumb = data['grandparent_thumb']
|
||||
else:
|
||||
rating_key = ''
|
||||
title = ''
|
||||
thumb = ''
|
||||
%>
|
||||
% if data['rating_key'] and data['media_type'] not in ('photo', 'clip'):
|
||||
<a id="poster-url-${data['session_key']}" href="info?rating_key=${rating_key}" title="${title}" class="hidden-xs">
|
||||
<div id="poster-${data['session_key']}" class="dashboard-activity-poster" style="background-image: url(pms_image_proxy?img=${thumb}&width=300&height=450&fallback=poster&refresh=true);"></div>
|
||||
<div id="poster-${data['session_key']}" class="dashboard-activity-${'cover' if data['media_type'] == 'track' else 'poster'}" style="background-image: url(pms_image_proxy?img=${thumb}&width=300&height=450&fallback=poster&refresh=true);"></div>
|
||||
</a>
|
||||
% elif data['media_type']:
|
||||
<div id="poster-${data['session_key']}" class="dashboard-activity-poster" style="background-image: url(pms_image_proxy?img=${thumb}&width=300&height=450&fallback=poster&refresh=true);"></div>
|
||||
|
@ -103,7 +107,13 @@ DOCUMENTATION :: END
|
|||
<div id="poster-${data['session_key']}" class="dashboard-activity-poster" style="background-image: url(images/art.png);"></div>
|
||||
% endif
|
||||
<div class="dashboard-activity-info-icon">
|
||||
<div id="platform-${data['session_key']}" class="dashboard-activity-info-platform${'-no-terminate' if not _session['user_group'] == 'admin' else ''}" title="${data['platform']}">
|
||||
<%
|
||||
if not _session['user_group'] == 'admin' or data['synced_version'] == '1':
|
||||
no_terminate = '-no-terminate'
|
||||
else:
|
||||
no_terminate = ''
|
||||
%>
|
||||
<div id="platform-${data['session_key']}" class="dashboard-activity-info-platform${no_terminate}" title="${data['platform']}">
|
||||
<script>
|
||||
$("#platform-${data['session_key']}").css("background-image", "url(" + getPlatformImagePath('${data['platform']}') + ")");
|
||||
</script>
|
||||
|
@ -133,9 +143,9 @@ DOCUMENTATION :: END
|
|||
br = helpers.cast_to_int(data['stream_bitrate']) or ''
|
||||
if br:
|
||||
if br > 1000:
|
||||
br = '(' + str(round(br / 1000.0, 1)) + 'Mbps)'
|
||||
br = '(' + str(round(br / 1000.0, 1)) + ' Mbps)'
|
||||
else:
|
||||
br = '(' + str(br) + 'kbps)'
|
||||
br = '(' + str(br) + ' kbps)'
|
||||
%>
|
||||
${data['quality_profile']} ${br}
|
||||
% else:
|
||||
|
@ -170,7 +180,7 @@ DOCUMENTATION :: END
|
|||
% elif data['transcode_decision'] == 'copy':
|
||||
Direct Stream
|
||||
% else:
|
||||
Direct Play
|
||||
Direct Play ${'(Synced)' if data['synced_version'] else ''}
|
||||
% endif
|
||||
</div>
|
||||
</li>
|
||||
|
@ -214,11 +224,11 @@ DOCUMENTATION :: END
|
|||
<div class="sub-heading">Audio</div>
|
||||
<div class="sub-value" id="audio_decision-${data['session_key']}">
|
||||
% if data['stream_audio_decision'] == 'transcode':
|
||||
Transcode (${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['audio_codec'], data['audio_codec'].upper())} ${data['audio_channel_layout'].split('(')[0]} → ${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['stream_audio_codec'], data['stream_audio_codec'].upper())} ${data['stream_audio_channel_layout']})
|
||||
Transcode (${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['audio_codec'], data['audio_codec'].upper())} ${data['audio_channel_layout'].split('(')[0].capitalize()} → ${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['stream_audio_codec'], data['stream_audio_codec'].upper())} ${data['stream_audio_channel_layout'].split('(')[0].capitalize()})
|
||||
% elif data['stream_audio_decision'] == 'copy':
|
||||
Direct Stream (${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['stream_audio_codec'], data['stream_audio_codec'].upper())} ${data['stream_audio_channel_layout']})
|
||||
Direct Stream (${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['stream_audio_codec'], data['stream_audio_codec'].upper())} ${data['stream_audio_channel_layout'].split('(')[0].capitalize()})
|
||||
% else:
|
||||
Direct Play (${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['audio_codec'], data['audio_codec'].upper())} ${data['audio_channel_layout'].split('(')[0]})
|
||||
Direct Play (${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['audio_codec'], data['audio_codec'].upper())} ${data['audio_channel_layout'].split('(')[0].capitalize()})
|
||||
% endif
|
||||
</div>
|
||||
</li>
|
||||
|
@ -268,17 +278,21 @@ DOCUMENTATION :: END
|
|||
<li class="dashboard-activity-info-item">
|
||||
<div class="sub-heading">Bandwidth</div>
|
||||
<div class="sub-value">
|
||||
% if data['media_type'] != 'photo' and 'location' in data:
|
||||
% if data['media_type'] != 'photo' and data['bandwidth']:
|
||||
<%
|
||||
bw = helpers.cast_to_int(data['bandwidth']) or "Unknown"
|
||||
if bw != "Unknown":
|
||||
if bw > 1000:
|
||||
bw = str(round(bw / 1000.0, 1)) + 'Mbps'
|
||||
bw = str(round(bw / 1000.0, 1)) + ' Mbps'
|
||||
else:
|
||||
bw = str(bw) + 'kbps'
|
||||
bw = str(bw) + ' kbps'
|
||||
%>
|
||||
<span id="stream-bandwidth-${data['session_key']}">${bw}</span>
|
||||
<span id="streaming-brain-${data['session_key']}" data-toggle="tooltip" title="Streaming Brain Estimate"><i class="fa fa-info-circle"></i></span>
|
||||
% elif data['synced_version'] == '1':
|
||||
<span id="stream-bandwidth-${data['session_key']}">None</span>
|
||||
% else:
|
||||
<span id="stream-bandwidth-${data['session_key']}">Unknown</span>
|
||||
% endif
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -324,7 +324,7 @@
|
|||
} else if (s.transcode_decision === 'copy') {
|
||||
transcode_decision = 'Direct Stream';
|
||||
} else {
|
||||
transcode_decision = 'Direct Play';
|
||||
transcode_decision = 'Direct Play' + ((s.synced_version == 1) ? ' (Synced)' : '');
|
||||
}
|
||||
$('#transcode_decision-' + key).html(transcode_decision);
|
||||
|
||||
|
@ -383,11 +383,11 @@
|
|||
var a_codec = (s.audio_codec === 'truehd') ? 'TrueHD' : s.audio_codec.toUpperCase();
|
||||
var sa_codec = (s.stream_audio_codec === 'truehd') ? 'TrueHD' : s.stream_audio_codec.toUpperCase();
|
||||
if (s.stream_audio_decision === 'transcode') {
|
||||
audio_decision = 'Transcode (' + a_codec + ' ' + s.audio_channel_layout.split('(')[0] + ' → ' + sa_codec + ' ' + s.stream_audio_channel_layout + ')';
|
||||
audio_decision = 'Transcode (' + a_codec + ' ' + capitalizeFirstLetter(s.audio_channel_layout.split('(')[0]) + ' → ' + sa_codec + ' ' + capitalizeFirstLetter(s.stream_audio_channel_layout.split('(')[0]) + ')';
|
||||
} else if (s.stream_audio_decision === 'copy') {
|
||||
audio_decision = 'Direct Stream (' + sa_codec + ' ' + s.stream_audio_channel_layout + ')';
|
||||
audio_decision = 'Direct Stream (' + sa_codec + ' ' + capitalizeFirstLetter(s.stream_audio_channel_layout.split('(')[0]) + ')';
|
||||
} else {
|
||||
audio_decision = 'Direct Play (' + a_codec + ' ' + s.audio_channel_layout.split('(')[0] + ')';
|
||||
audio_decision = 'Direct Play (' + a_codec + ' ' + capitalizeFirstLetter(s.audio_channel_layout.split('(')[0]) + ')';
|
||||
}
|
||||
}
|
||||
$('#audio_decision-' + key).html(audio_decision);
|
||||
|
@ -411,9 +411,9 @@
|
|||
var br = parseInt(s.stream_bitrate) || '';
|
||||
if (br) {
|
||||
if (br > 1000) {
|
||||
br = ' (' + (br / 1000).toFixed(1) + 'Mbps)';
|
||||
br = ' (' + (br / 1000).toFixed(1) + ' Mbps)';
|
||||
} else {
|
||||
br = ' (' + br + 'kbps)';
|
||||
br = ' (' + br + ' kbps)';
|
||||
}
|
||||
}
|
||||
$('#stream_quality-' + key).html(s.quality_profile + br);
|
||||
|
@ -422,15 +422,17 @@
|
|||
}
|
||||
$('#optimized_version-' + key).html(s.optimized_version_profile);
|
||||
|
||||
var bw = parseInt(s.bandwidth) || 'Unknown';
|
||||
if (bw != "Unknown") {
|
||||
if (bw > 1000) {
|
||||
bw = (bw / 1000).toFixed(1) + 'Mbps';
|
||||
} else {
|
||||
bw = bw + ' kbps'
|
||||
if (s.media_type != 'photo' && s.bandwidth) {
|
||||
var bw = parseInt(s.bandwidth) || 'Unknown';
|
||||
if (bw != "Unknown") {
|
||||
if (bw > 1000) {
|
||||
bw = (bw / 1000).toFixed(1) + ' Mbps';
|
||||
} else {
|
||||
bw = bw + ' kbps'
|
||||
}
|
||||
}
|
||||
$('#stream-bandwidth-' + key).html(bw);
|
||||
}
|
||||
$('#stream-bandwidth-' + key).html(bw );
|
||||
|
||||
// Update the stream progress times
|
||||
$('#stream-eta-' + key).html(moment().add(parseInt(s.duration) - parseInt(s.view_offset), 'milliseconds').format(time_format));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue