Skip to content

Commit

Permalink
fix uptime display
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleyel committed Oct 18, 2023
1 parent e40f566 commit 2e86892
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugin/controllers/models/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,9 @@ def getInfo(session=None, need_fullinfo=False):
f.close()
uptimetext = ""
if uptime > 86400:
d = uptime / 86400
uptimetext = f"{int(uptime / 86400)}d "
uptime = uptime % 86400
uptimetext += f"{d}d "
uptimetext += "%s:%.2d" % (uptime / 3600, (uptime % 3600) / 60)
uptimetext = f"{uptimetext}{int(uptime / 3600):02d}:{int((uptime % 3600) / 60):02d}"
except: # nosec # noqa: E722
uptimetext = "?"
info["uptime"] = uptimetext
Expand Down

0 comments on commit 2e86892

Please sign in to comment.