diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index d1bbf0b01a..4aa8615b44 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1046,7 +1046,7 @@ def _map_to_format_list(urlmap): for f in formats: if f['format_id'] in dash_keys: f['format_id'] = 'nondash-%s' % f['format_id'] - f['preference'] -= 10000 + f['preference'] = f.get('preference', 0) - 10000 formats.extend(dash_formats) self._sort_formats(formats)