]> jfr.im git - yt-dlp.git/commitdiff
[formats] Fix best fallback for storyboards
authorpukkandan <redacted>
Thu, 6 Jul 2023 12:47:42 +0000 (18:17 +0530)
committerpukkandan <redacted>
Thu, 6 Jul 2023 16:09:58 +0000 (21:39 +0530)
Partial fix for #7478

yt_dlp/YoutubeDL.py

index 448a15bc954c5f0585d9377e0bd8ef515d8c32a0..2c5014f87059257aa799ead87a15cdc1ed99a839 100644 (file)
@@ -2766,11 +2766,8 @@ def is_wellformed(f):
             formats_to_download = list(format_selector({
                 'formats': formats,
                 'has_merged_format': any('none' not in (f.get('acodec'), f.get('vcodec')) for f in formats),
-                'incomplete_formats': (
-                    # All formats are video-only or
-                    all(f.get('vcodec') != 'none' and f.get('acodec') == 'none' for f in formats)
-                    # all formats are audio-only
-                    or all(f.get('vcodec') == 'none' and f.get('acodec') != 'none' for f in formats)),
+                'incomplete_formats': (all(f.get('vcodec') == 'none' for f in formats)  # No formats with video
+                                       or all(f.get('acodec') == 'none' for f in formats)),  # OR, No formats with audio
             }))
             if interactive_format_selection and not formats_to_download:
                 self.report_error('Requested format is not available', tb=False, is_error=False)