mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Some more minor changes
This commit is contained in:
parent
35528ef602
commit
3c1290e8fd
5 changed files with 18 additions and 7 deletions
|
@ -150,7 +150,7 @@ def human_duration(s, sig='dhms'):
|
|||
|
||||
hd = ''
|
||||
|
||||
if str(s).isdigit():
|
||||
if str(s).isdigit() and s > 0:
|
||||
d = int(s / 84600)
|
||||
h = int((s % 84600) / 3600)
|
||||
m = int(((s % 84600) % 3600) / 60)
|
||||
|
@ -173,6 +173,8 @@ def human_duration(s, sig='dhms'):
|
|||
hd_list.append(str(s) + ' secs')
|
||||
|
||||
hd = ' '.join(hd_list)
|
||||
else:
|
||||
hd = '0'
|
||||
|
||||
return hd
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue