We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2782681 commit 556a55eCopy full SHA for 556a55e
octoprint_wrapped/__init__.py
@@ -227,7 +227,11 @@ def _to_duration_days(self, seconds: int) -> str:
227
minutes = int(seconds / SECONDS_MINUTE)
228
seconds -= minutes * SECONDS_MINUTE
229
230
- return f"{days}d {hours}h {minutes}m"
+ if days >= 100:
231
+ # strip the minutes to keep things fitting...
232
+ return f"{days}d {hours}h"
233
+ else:
234
+ return f"{days}d {hours}h {minutes}m"
235
236
def _to_duration_hours(self, seconds: int) -> str:
237
hours = int(seconds / SECONDS_HOUR)
0 commit comments