From 241e76c17d3c39c7e7cd22c61718c656233752f2 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 21 May 2024 21:08:24 +0200 Subject: [PATCH] cleane get_duration_str without zfill on first part --- tubearchivist/home/src/ta/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tubearchivist/home/src/ta/helper.py b/tubearchivist/home/src/ta/helper.py index 88c6b50d..767b4a00 100644 --- a/tubearchivist/home/src/ta/helper.py +++ b/tubearchivist/home/src/ta/helper.py @@ -186,6 +186,8 @@ def get_duration_str(seconds: int) -> str: unit_count, seconds = divmod(seconds, unit_seconds) duration_parts.append(f"{unit_count:02}{unit_label}") + duration_parts[0] = duration_parts[0].lstrip("0") + return " ".join(duration_parts)