Skip to content

Commit

Permalink
[formats] Fix best fallback for storyboards
Browse files Browse the repository at this point in the history
Partial fix for #7478
  • Loading branch information
pukkandan committed Jul 6, 2023
1 parent 337734d commit 906c0bd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions yt_dlp/YoutubeDL.py
Expand Up @@ -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)
Expand Down

0 comments on commit 906c0bd

Please sign in to comment.