mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-31 01:27:53 +08:00
[youtube] Handle cases where format comes without a preference (Fixes #4648)
This commit is contained in:
parent
8f9529cd05
commit
ee61f6f3e2
@ -1046,7 +1046,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
|||||||
for f in formats:
|
for f in formats:
|
||||||
if f['format_id'] in dash_keys:
|
if f['format_id'] in dash_keys:
|
||||||
f['format_id'] = 'nondash-%s' % f['format_id']
|
f['format_id'] = 'nondash-%s' % f['format_id']
|
||||||
f['preference'] -= 10000
|
f['preference'] = f.get('preference', 0) - 10000
|
||||||
formats.extend(dash_formats)
|
formats.extend(dash_formats)
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
Loading…
Reference in New Issue
Block a user