home
·
contact
·
privacy
projects
/
ytplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d6ece1
)
Restore decimal zeroes to VideoFile.duration milliseconds lost in previous commit.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 18 Feb 2025 12:55:00 +0000
(13:55 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 18 Feb 2025 12:55:00 +0000
(13:55 +0100)
src/ytplom/misc.py
patch
|
blob
|
history
diff --git
a/src/ytplom/misc.py
b/src/ytplom/misc.py
index 28fcab6be7ce17d3cf4da610840b99666390aefc..82fb7c584304740e3ab73dc057d6cb437a9e0c9e 100644
(file)
--- 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: