fixed string formatting
This commit is contained in:
parent
99dd9126fd
commit
b12e67d903
|
@ -98,7 +98,7 @@ class WebVTTFormatter(Formatter):
|
||||||
hours, remainder = divmod(time, 3600)
|
hours, remainder = divmod(time, 3600)
|
||||||
mins, secs = divmod(remainder, 60)
|
mins, secs = divmod(remainder, 60)
|
||||||
ms = int(round((time - int(time))*1000, 2))
|
ms = int(round((time - int(time))*1000, 2))
|
||||||
return "{:02d}:{:02d}:{:02d}.{:03d}".format(hours, mins, secs, ms)
|
return "{:02.0f}:{:02.0f}:{:02.0f}.{:03d}".format(hours, mins, secs, ms)
|
||||||
|
|
||||||
def format_transcript(self, transcript, **kwargs):
|
def format_transcript(self, transcript, **kwargs):
|
||||||
"""A basic implementation of WEBVTT formatting.
|
"""A basic implementation of WEBVTT formatting.
|
||||||
|
|
Loading…
Reference in New Issue