mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Fix rounding of seconds on home stats
This commit is contained in:
parent
092d858b12
commit
b9c1dccf48
1 changed files with 2 additions and 0 deletions
|
@ -58,6 +58,8 @@ DOCUMENTATION :: END
|
||||||
# Human readable duration
|
# Human readable duration
|
||||||
def hd(seconds):
|
def hd(seconds):
|
||||||
m, s = divmod(cast_to_int(seconds), 60)
|
m, s = divmod(cast_to_int(seconds), 60)
|
||||||
|
if s > 30:
|
||||||
|
m += 1
|
||||||
h, m = divmod(m, 60)
|
h, m = divmod(m, 60)
|
||||||
return str(h).zfill(1) + ':' + str(m).zfill(2)
|
return str(h).zfill(1) + ':' + str(m).zfill(2)
|
||||||
%>
|
%>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue