fix(youtubedl): always cast to int when formatting duration
This commit is contained in:
parent
da5db1e73a
commit
a5503751a5
@ -122,8 +122,8 @@ class QueuedPlayer:
|
||||
return self.__repr__()
|
||||
|
||||
|
||||
def format_duration(duration: int) -> str:
|
||||
hours, duration = divmod(duration, 3600)
|
||||
def format_duration(duration: int | float) -> str:
|
||||
hours, duration = divmod(int(duration), 3600)
|
||||
minutes, duration = divmod(duration, 60)
|
||||
segments = [hours, minutes, duration]
|
||||
if len(segments) == 3 and segments[0] == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user