mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-13 21:15:15 +00:00
[ie/youtube] Fix dashy formats extraction (#14852)
Fix 6224a38988
Closes #14850
Authored by: bashonly
This commit is contained in:
@@ -3261,15 +3261,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
if live_status not in ('is_live', 'post_live'):
|
||||
fmt['available_at'] = available_at
|
||||
|
||||
if (all_formats or 'dashy' in format_types) and fmt['filesize']:
|
||||
https_fmts.append({
|
||||
**fmt,
|
||||
'format_id': f'{fmt["format_id"]}-dashy' if all_formats else fmt['format_id'],
|
||||
'protocol': 'http_dash_segments',
|
||||
'fragments': build_fragments(fmt),
|
||||
})
|
||||
if all_formats or 'dashy' not in format_types:
|
||||
fmt['downloader_options'] = {'http_chunk_size': CHUNK_SIZE}
|
||||
https_fmts.append(fmt)
|
||||
|
||||
# Bulk process sig/n handling
|
||||
@@ -3346,7 +3337,17 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
if fmt in https_fmts:
|
||||
https_fmts.remove(fmt)
|
||||
|
||||
yield from https_fmts
|
||||
for fmt in https_fmts:
|
||||
if (all_formats or 'dashy' in format_types) and fmt['filesize']:
|
||||
yield {
|
||||
**fmt,
|
||||
'format_id': f'{fmt["format_id"]}-dashy' if all_formats else fmt['format_id'],
|
||||
'protocol': 'http_dash_segments',
|
||||
'fragments': build_fragments(fmt),
|
||||
}
|
||||
if all_formats or 'dashy' not in format_types:
|
||||
fmt['downloader_options'] = {'http_chunk_size': CHUNK_SIZE}
|
||||
yield fmt
|
||||
|
||||
yield from process_https_formats()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user