From c18d4482b1849e1d3854f146b199779aabff43db Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 4 Nov 2021 23:30:11 +0530 Subject: [PATCH] [youtube] Fix sorting for some videos --- yt_dlp/extractor/youtube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 71428ad3a..28bb2fbdf 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -2512,7 +2512,7 @@ def _extract_formats(self, streaming_data, video_id, player_url, is_live): ' (default)' if audio_track.get('audioIsDefault') else ''), fmt.get('qualityLabel') or quality.replace('audio_quality_', ''), throttled and 'THROTTLED'))), - 'source_preference': -10 if not throttled else -1, + 'source_preference': -10 if throttled else -1, 'fps': int_or_none(fmt.get('fps')) or None, 'height': height, 'quality': q(quality), @@ -2695,7 +2695,7 @@ def feed_entry(name): # Source is given priority since formats that throttle are given lower source_preference # When throttling issue is fully fixed, remove this - self._sort_formats(formats, ('quality', 'res', 'fps', 'hdr:12', 'source', 'codec:vp9.2', 'lang')) + self._sort_formats(formats, ('quality', 'res', 'fps', 'hdr:12', 'source', 'codec:vp9.2', 'lang', 'proto')) keywords = get_first(video_details, 'keywords', expected_type=list) or [] if not keywords and webpage: