aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-07-06 18:17:42 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-07-06 21:39:58 +0530
commit906c0bdcd8974340d619e99ccd613c163eb0d0c2 (patch)
treece8601121e504db51722a2538d7e2cd34b3e28f6
parent337734d4a8a6500bc65434843db346b5cbd05e81 (diff)
downloadhypervideo-pre-906c0bdcd8974340d619e99ccd613c163eb0d0c2.tar.lz
hypervideo-pre-906c0bdcd8974340d619e99ccd613c163eb0d0c2.tar.xz
hypervideo-pre-906c0bdcd8974340d619e99ccd613c163eb0d0c2.zip
[formats] Fix best fallback for storyboards
Partial fix for #7478
-rw-r--r--yt_dlp/YoutubeDL.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 448a15bc9..2c5014f87 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -2766,11 +2766,8 @@ class YoutubeDL:
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)