mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Add pseudo view offset counter
This commit is contained in:
parent
43f285951d
commit
5d8da23c3f
2 changed files with 17 additions and 4 deletions
|
@ -282,11 +282,11 @@ DOCUMENTATION :: END
|
|||
<script>
|
||||
$("#stream-eta-${data['session_key']}").html(moment().add(parseInt("${data['duration']}") - parseInt("${data['view_offset']}"), 'milliseconds').format(time_format));
|
||||
</script>
|
||||
</span><br /><span class="progress_time" id="stream-view-offset-${data['session_key']}">
|
||||
</span><br /><span class="progress_time_offset" id="stream-view-offset-${data['session_key']}" data-last_view_offset="${data['view_offset']}" data-view_offset="${data['view_offset']}" data-state="${data['state']}">
|
||||
<script>
|
||||
$("#stream-view-offset-${data['session_key']}").html(millisecondsToMinutes(parseInt("${data['view_offset']}"), false));
|
||||
</script>
|
||||
</span> / <span class="progress_time" id="stream-duration-${data['session_key']}">
|
||||
</span> / <span class="progress_time_total" id="stream-duration-${data['session_key']}">
|
||||
<script>
|
||||
$("#stream-duration-${data['session_key']}").html(millisecondsToMinutes(parseInt("${data['duration']}"), false));
|
||||
</script>
|
||||
|
|
|
@ -227,7 +227,6 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
currentActivityHeader();
|
||||
|
||||
function getCurrentActivity() {
|
||||
$.ajax({
|
||||
|
@ -431,7 +430,10 @@
|
|||
|
||||
// Update the stream progress times
|
||||
$('#stream-eta-' + key).html(moment().add(parseInt(s.duration) - parseInt(s.view_offset), 'milliseconds').format(time_format));
|
||||
$('#stream-view-offset-' + key).html(millisecondsToMinutes(s.view_offset, false));
|
||||
$('#stream-view-offset-' + key).data('state', s.state);
|
||||
if ($('#stream-view-offset-' + key).data('last_view_offset') != s.view_offset) {
|
||||
$('#stream-view-offset-' + key).data('last_view_offset', s.view_offset).data('view_offset', s.view_offset);
|
||||
}
|
||||
|
||||
// Update the progress bars, percent - 3 because of 3px padding-right
|
||||
$('#buffer-bar-' + key).width(parseInt(s.transcode_progress) - 3 + '%').html(s.transcode_progress + '%')
|
||||
|
@ -477,12 +479,23 @@
|
|||
});
|
||||
}
|
||||
|
||||
currentActivityHeader();
|
||||
getCurrentActivity();
|
||||
setInterval(function () {
|
||||
currentActivityHeader();
|
||||
getCurrentActivity();
|
||||
}, 2000);
|
||||
|
||||
setInterval( function(){
|
||||
$('.progress_time_offset').each(function () {
|
||||
if ($(this).data('state') === 'playing') {
|
||||
var ms = parseInt($(this).data('view_offset'));
|
||||
var timestamp = millisecondsToMinutes(ms, false);
|
||||
$(this).html(timestamp).data('view_offset', ms + 1000)
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
$('#currentActivity').on('click', '.external_ip-modal', function () {
|
||||
$.get('get_ip_address_details', {
|
||||
ip_address: $(this).data('ip')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue