diff options
author | Simon Sawicki <contact@grub4k.xyz> | 2024-10-27 00:17:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-27 00:17:26 +0200 |
commit | 5c880ef42e9c2b2fc412f6d69dad37d34fb75a62 (patch) | |
tree | 200ea3c0318c8610cd63f6caeec6e20e9bf36b4e /yt_dlp/YoutubeDL.py | |
parent | 21cdcf03a237a0c4979c941d5a5385cae44c7906 (diff) |
[core] Populate format sorting fields before dependent fields (#11353)
Authored by: Grub4K
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 48185b769..f08a31afa 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2849,13 +2849,10 @@ class YoutubeDL: sanitize_string_field(fmt, 'format_id') sanitize_numeric_fields(fmt) fmt['url'] = sanitize_url(fmt['url']) - if fmt.get('ext') is None: - fmt['ext'] = determine_ext(fmt['url']).lower() + FormatSorter._fill_sorting_fields(fmt) if fmt['ext'] in ('aac', 'opus', 'mp3', 'flac', 'vorbis'): if fmt.get('acodec') is None: fmt['acodec'] = fmt['ext'] - if fmt.get('protocol') is None: - fmt['protocol'] = determine_protocol(fmt) if fmt.get('resolution') is None: fmt['resolution'] = self.format_resolution(fmt, default=None) if fmt.get('dynamic_range') is None and fmt.get('vcodec') != 'none': |