mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 13:23:24 -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
|
@ -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