mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 00:06:07 -07:00
Update stream info on current activity refresh
This commit is contained in:
parent
03de680915
commit
a42a1af867
2 changed files with 53 additions and 69 deletions
|
@ -135,79 +135,39 @@ DOCUMENTATION :: END
|
||||||
% endif
|
% endif
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
% if data['media_type'] == 'track':
|
|
||||||
% if data['audio_decision'] == 'direct play':
|
|
||||||
Stream <strong>Direct Play</strong>
|
|
||||||
% elif data['audio_decision'] == 'copy':
|
|
||||||
Stream <strong>Direct Stream</strong>
|
|
||||||
% else:
|
|
||||||
Stream <strong>
|
|
||||||
Transcoding
|
|
||||||
<span id="transcode-state-${data['session_key']}">
|
<span id="transcode-state-${data['session_key']}">
|
||||||
(Speed: ${data['transcode_speed']})
|
% if data['video_decision'] == 'transcode' or data['audio_decision'] == 'transcode':
|
||||||
|
Stream <strong>Transcode (Speed: ${data['transcode_speed']})
|
||||||
% if data['throttled'] == '1':
|
% if data['throttled'] == '1':
|
||||||
(Throttled)
|
(Throttled)
|
||||||
% endif
|
% endif
|
||||||
</span>
|
|
||||||
</strong>
|
</strong>
|
||||||
% endif
|
% elif data['video_decision'] == 'copy' or data['audio_decision'] == 'copy':
|
||||||
<br />
|
|
||||||
% if data['audio_decision'] == 'direct play':
|
|
||||||
Audio <strong>Direct Play (${data['audio_codec']}) (${data['audio_channels']}ch)</strong>
|
|
||||||
% elif data['audio_decision'] == 'copy':
|
|
||||||
Audio <strong>Direct Stream (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
|
||||||
% elif data['audio_decision'] == 'transcode':
|
|
||||||
Audio <strong>Transcode (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
|
||||||
% endif
|
|
||||||
% elif data['media_type'] == 'episode' or data['media_type'] == 'movie' or data['media_type'] == 'clip':
|
|
||||||
% if data['video_decision'] == 'direct play' and data['audio_decision'] == 'direct play':
|
|
||||||
Stream <strong>Direct Play</strong>
|
|
||||||
% elif data['video_decision'] == 'copy' and data['audio_decision'] == 'copy':
|
|
||||||
Stream <strong>Direct Stream</strong>
|
Stream <strong>Direct Stream</strong>
|
||||||
% else:
|
% else:
|
||||||
Stream <strong>
|
Stream <strong>Direct Play</strong>
|
||||||
Transcoding
|
|
||||||
<span id="transcode-state-${data['session_key']}">
|
|
||||||
(Speed: ${data['transcode_speed']})
|
|
||||||
% if data['throttled'] == '1':
|
|
||||||
(Throttled)
|
|
||||||
% endif
|
|
||||||
</span>
|
|
||||||
</strong>
|
|
||||||
% endif
|
% endif
|
||||||
<br />
|
<br />
|
||||||
% if data['video_decision'] == 'direct play':
|
% if data['video_decision'] and data['media_type'] != 'photo':
|
||||||
Video <strong>Direct Play (${data['video_codec']}) (${data['width']}x${data['height']})</strong>
|
% if data['video_decision'] == 'transcode':
|
||||||
|
Video <strong>Transcode (${data['transcode_video_codec']}) (${data['transcode_width']}x${data['transcode_height']})</strong>
|
||||||
% elif data['video_decision'] == 'copy':
|
% elif data['video_decision'] == 'copy':
|
||||||
Video <strong>Direct Stream (${data['transcode_video_codec']}) (${data['width']}x${data['height']})</strong>
|
Video <strong>Direct Stream (${data['transcode_video_codec']}) (${data['width']}x${data['height']})</strong>
|
||||||
% elif data['video_decision'] == 'transcode':
|
% else:
|
||||||
Video <strong>Transcode (${data['transcode_video_codec']}) (${data['transcode_width']}x${data['transcode_height']})</strong>
|
Video <strong>Direct Play (${data['video_codec']}) (${data['width']}x${data['height']})</strong>
|
||||||
% endif
|
% endif
|
||||||
<br />
|
<br />
|
||||||
% if data['audio_decision'] == 'direct play':
|
% endif
|
||||||
Audio <strong>Direct Play (${data['audio_codec']}) (${data['audio_channels']}ch)</strong>
|
% if data['audio_decision']:
|
||||||
|
% if data['audio_decision'] == 'transcode':
|
||||||
|
Audio <strong>Transcode (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
||||||
% elif data['audio_decision'] == 'copy':
|
% elif data['audio_decision'] == 'copy':
|
||||||
Audio <strong>Direct Stream (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
Audio <strong>Direct Stream (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
||||||
% elif data['audio_decision'] == 'transcode':
|
|
||||||
Audio <strong>Transcode (${data['transcode_audio_codec']}) (${data['transcode_audio_channels']}ch)</strong>
|
|
||||||
% endif
|
|
||||||
% elif data['media_type'] == 'photo':
|
|
||||||
% if data['video_decision'] == 'direct play':
|
|
||||||
Stream <strong>Direct Play</strong>
|
|
||||||
% elif data['video_decision'] == 'copy':
|
|
||||||
Stream <strong>Direct Stream</strong>
|
|
||||||
% else:
|
% else:
|
||||||
Stream <strong>
|
Audio <strong>Direct Play (${data['audio_codec']}) (${data['audio_channels']}ch)</strong>
|
||||||
<span id="transcode-state-${data['session_key']}">
|
% endif
|
||||||
(Speed: ${data['transcode_speed']})
|
|
||||||
% if data['throttled'] == '1':
|
|
||||||
(Throttled)
|
|
||||||
% endif
|
% endif
|
||||||
</span>
|
</span>
|
||||||
</strong>
|
|
||||||
% endif
|
|
||||||
% endif
|
|
||||||
<br>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% if data['media_type'] != 'photo':
|
% if data['media_type'] != 'photo':
|
||||||
|
|
|
@ -169,10 +169,34 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// if transcoding, update the transcode state
|
// if transcoding, update the transcode state
|
||||||
|
var ts = '';
|
||||||
if (s.video_decision == 'transcode' || s.audio_decision == 'transcode') {
|
if (s.video_decision == 'transcode' || s.audio_decision == 'transcode') {
|
||||||
var throttled = (s.throttled == '1') ? ' (Throttled)' : '';
|
var throttled = (s.throttled == '1') ? ' (Throttled)' : '';
|
||||||
$('#transcode-state-' + key).html('(Speed: ' + s.transcode_speed + ')' + throttled);
|
ts += 'Stream <strong>Transcode (Speed: ' + s.transcode_speed + ')' + throttled + '</strong><br>';
|
||||||
|
} else if (s.video_decision == 'copy' || s.audio_decision == 'copy') {
|
||||||
|
ts += 'Stream <strong>Direct Stream</strong><br>';
|
||||||
|
} else {
|
||||||
|
ts += 'Stream <strong>Direct Play</strong><br>';
|
||||||
}
|
}
|
||||||
|
if (s.video_decision != '' && s.media_type != 'photo') {
|
||||||
|
if (s.video_decision == 'transcode') {
|
||||||
|
ts += 'Video <strong>Transcode (' + s.transcode_video_codec + ') (' + s.transcode_width + 'x' + s.transcode_height + ')</strong><br>';
|
||||||
|
} else if (s.video_decision == 'copy') {
|
||||||
|
ts += 'Video <strong>Direct Stream (' + s.transcode_video_codec + ') (' + s.width + 'x' + s.height + ')</strong><br>';
|
||||||
|
} else {
|
||||||
|
ts += 'Video <strong>Direct Play (' + s.video_codec + ') (' + s.width + 'x' + s.height + ')</strong><br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (s.audio_decision != '') {
|
||||||
|
if (s.audio_decision == 'transcode') {
|
||||||
|
ts += 'Audio <strong>Transcode (' + s.transcode_audio_codec + ') (' + s.transcode_audio_channels + 'ch)</strong>';
|
||||||
|
} else if (s.audio_decision == 'copy') {
|
||||||
|
ts += 'Audio <strong>Direct Stream (' + s.transcode_audio_codec + ') (' + s.transcode_audio_channels + 'ch)</strong>';
|
||||||
|
} else {
|
||||||
|
ts += 'Audio <strong>Direct Play (' + s.audio_codec + ') (' + s.audio_channels + 'ch)</strong>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#transcode-state-' + key).html(ts);
|
||||||
|
|
||||||
// update the stream progress times
|
// update the stream progress times
|
||||||
$('#stream-eta-' + key).html(moment().add(parseInt(s.duration) - parseInt(s.view_offset), 'milliseconds').format(time_format));
|
$('#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