Fix stuff

pull/11608/head
sepro 5 days ago
parent d14a82dfc6
commit 8ed7a5343c

@ -125,7 +125,7 @@ class FileDownloader:
time = timetuple_from_msec(seconds * 1000)
if time.hours > 99:
return '--:--:--'
return '{:02d}:{:02d}:{:02d}'.format(*time[:-1])
return '{:02d}:{:02d}:{:02d}'.format(*map(int, time[:-1]))
@classmethod
def format_eta(cls, seconds):

@ -2230,7 +2230,7 @@ class InfoExtractor:
# format_id intact.
if not live:
stream_name = build_stream_name()
format_id[1] = stream_name or f'{tbr or len(formats)}'
format_id[1] = stream_name or f'{int(tbr) or len(formats)}'
f = {
'format_id': join_nonempty(*format_id),
'format_index': idx,

@ -3380,12 +3380,12 @@ def parse_dfxp_time_expr(time_expr):
def srt_subtitles_timecode(seconds):
return '{:02d}:{:02d}:{:02d},{:03d}'.format(*timetuple_from_msec(seconds * 1000))
return '{:02d}:{:02d}:{:02d},{:03d}'.format(*map(int, timetuple_from_msec(seconds * 1000)))
def ass_subtitles_timecode(seconds):
time = timetuple_from_msec(seconds * 1000)
return '{:01d}:{:02d}:{:02d}.{:02d}'.format(*time[:-1], int(time.milliseconds / 10))
return '{:01d}:{:02d}:{:02d}.{:02d}'.format(*map(int, time[:-1]), int(time.milliseconds / 10))
def dfxp2srt(dfxp_data):

Loading…
Cancel
Save