Update formatters.py

corrected hours calculation logic in class WebVTTFormatter  method _seconds_to_timestamp for transcripts with more than an hour length
This commit is contained in:
esha71 2021-05-30 02:30:56 +05:30 committed by GitHub
parent c5bf0132ff
commit 6f4ab9decd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -95,8 +95,9 @@ class WebVTTFormatter(Formatter):
'00:00:06.930' '00:00:06.930'
""" """
time = float(time) time = float(time)
hours, mins, secs = ( hours= int(time) // 3600
int(time) // 3600, time= time - hours*3600
mins, secs = (
int(time) // 60, int(time) // 60,
int(time) % 60, int(time) % 60,
) )