From: Christian Heller Date: Tue, 18 Feb 2025 14:36:50 +0000 (+0100) Subject: Fix duration formatting. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/blog?a=commitdiff_plain;p=ytplom Fix duration formatting. --- diff --git a/src/ytplom/misc.py b/src/ytplom/misc.py index 82fb7c5..768227c 100644 --- a/src/ytplom/misc.py +++ b/src/ytplom/misc.py @@ -90,7 +90,7 @@ def ensure_expected_dirs(expected_dirs: list[Path]) -> None: def _readable_seconds(seconds: int) -> str: """Represent seconds in (up-to-hours) hexagesimal division.""" seconds_str = str(seconds % 60) - minutes_str = str(seconds // 60) + minutes_str = str((seconds // 60) % 60) hours_str = str(seconds // (60 * 60)) return ':'.join([f'0{s}' if len(s) == 1 else s for s in (hours_str, minutes_str, seconds_str)])