Skip to content

Commit b5830b3

Browse files
committed
Fix an error that occurred parsing the duration represented as float
1 parent 10d1286 commit b5830b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyvideothumbnailer

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ def format_time(duration_in_seconds: float) -> str:
219219
Returns:
220220
str: A human-readable representation of the duration.
221221
"""
222-
# Cast duration to full seconds
223-
duration = int(duration_in_seconds)
222+
# Parse duration and cast to full seconds
223+
duration = int(float(duration_in_seconds))
224224
# Determine full hours
225225
hours = int(duration / 3600)
226226
# Determine full minutes of started hour

0 commit comments

Comments
 (0)