diff --git a/yt_dlp/downloader/common.py b/yt_dlp/downloader/common.py index 81d9145f8..22583acae 100644 --- a/yt_dlp/downloader/common.py +++ b/yt_dlp/downloader/common.py @@ -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): diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 4088e894e..d52fa3eb9 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -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, diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index 3af48a69e..abe60302e 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -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):