when `--ignore-no-formats-error`
pull/6252/head
pukkandan 2 years ago
parent 8b37c58f8b
commit 9ebac35577
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

@ -2557,7 +2557,7 @@ class YoutubeDL:
formats = self._get_formats(info_dict)
# Backward compatibility with InfoExtractor._sort_formats
field_preference = formats[0].pop('__sort_fields', None)
field_preference = (formats or [{}])[0].pop('__sort_fields', None)
if field_preference:
info_dict['_format_sort_fields'] = field_preference

Loading…
Cancel
Save