mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[youtube] Fix sorting for some videos
This commit is contained in:
		@@ -2512,7 +2512,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
 | 
				
			|||||||
                              ' (default)' if audio_track.get('audioIsDefault') else ''),
 | 
					                              ' (default)' if audio_track.get('audioIsDefault') else ''),
 | 
				
			||||||
                    fmt.get('qualityLabel') or quality.replace('audio_quality_', ''),
 | 
					                    fmt.get('qualityLabel') or quality.replace('audio_quality_', ''),
 | 
				
			||||||
                    throttled and 'THROTTLED'))),
 | 
					                    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,
 | 
					                'fps': int_or_none(fmt.get('fps')) or None,
 | 
				
			||||||
                'height': height,
 | 
					                'height': height,
 | 
				
			||||||
                'quality': q(quality),
 | 
					                'quality': q(quality),
 | 
				
			||||||
@@ -2695,7 +2695,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Source is given priority since formats that throttle are given lower source_preference
 | 
					        # Source is given priority since formats that throttle are given lower source_preference
 | 
				
			||||||
        # When throttling issue is fully fixed, remove this
 | 
					        # 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 []
 | 
					        keywords = get_first(video_details, 'keywords', expected_type=list) or []
 | 
				
			||||||
        if not keywords and webpage:
 | 
					        if not keywords and webpage:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user