From: Christian Heller Date: Tue, 18 Feb 2025 12:55:00 +0000 (+0100) Subject: Restore decimal zeroes to VideoFile.duration milliseconds lost in previous commit. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/cards/%7B%7B%20card_id%20%7D%7D/%7B%7Bprefix%7D%7D/copy_free?a=commitdiff_plain;p=ytplom Restore decimal zeroes to VideoFile.duration milliseconds lost in previous commit. --- diff --git a/src/ytplom/misc.py b/src/ytplom/misc.py index 28fcab6..82fb7c5 100644 --- a/src/ytplom/misc.py +++ b/src/ytplom/misc.py @@ -452,8 +452,8 @@ class VideoFile(DbData): if self.duration_ms < 0: return '?' seconds_str = f'{_readable_seconds(self.duration_ms // ONE_MILLION)}' - return (seconds_str if short - else f'{seconds_str}.{self.duration_ms // ONE_MILLION}') + milliseconds_str = f'{self.duration_ms // ONE_MILLION}'.rjust(6, '0') + return seconds_str if short else f'{seconds_str}.{milliseconds_str}' @property def present(self) -> bool: