mirror of https://github.com/devine-dl/devine.git
fix(Chapter): Cast values to int prior to formatting
If left as float, then it parses as e.g., `7.0` instead of `07`. This leads to the timestamp format being completely off.
This commit is contained in:
parent
10285c3819
commit
5d1b54b8fa
|
@ -41,7 +41,7 @@ class Chapter:
|
|||
seconds, ms = divmod(int(remainder * 1000), 1000)
|
||||
else:
|
||||
raise TypeError
|
||||
timestamp = f"{hours:02}:{minutes:02}:{seconds:02}.{str(ms).zfill(3)[:3]}"
|
||||
timestamp = f"{int(hours):02}:{int(minutes):02}:{int(seconds):02}.{str(ms).zfill(3)[:3]}"
|
||||
|
||||
timestamp_m = TIMESTAMP_FORMAT.match(timestamp)
|
||||
if not timestamp_m:
|
||||
|
|
Loading…
Reference in New Issue