mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Add recently watched to user screen
This commit is contained in:
parent
fe6d5f17f0
commit
ba18c5b96e
6 changed files with 112 additions and 3 deletions
|
@ -217,4 +217,20 @@ function isPrivateIP(ip_address) {
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function humanTime(seconds) {
|
||||
if (seconds >= 86400) {
|
||||
text = '<h1> / </h1><h3>' + Math.floor(moment.duration(seconds, 'seconds').asDays()) +
|
||||
'</h3><p> days </p><h3>' + Math.floor(moment.duration((seconds % 86400), 'seconds').asHours()) +
|
||||
'</h3><p> hrs</p><h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + '</h3><p> mins</p>';
|
||||
return text;
|
||||
} else if (seconds >= 3600) {
|
||||
text = '<h1> / </h1><h3>' + Math.floor(moment.duration((seconds % 86400), 'seconds').asHours()) +
|
||||
'</h3><p>hrs</p><h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + '</h3><p> mins</p>';
|
||||
return text;
|
||||
} else if (seconds >= 60) {
|
||||
text = '<h1> / </h1><h3>' + Math.floor(moment.duration(((seconds % 86400) % 3600), 'seconds').asMinutes()) + '</h3><p> mins</p>';
|
||||
return text;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue