mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[YoutubeDL] Fix incomplete formats check
This commit is contained in:
parent
317f7ab634
commit
2e221ca3a8
1 changed files with 3 additions and 4 deletions
|
@ -1396,12 +1396,11 @@ def process_video_result(self, info_dict, download=True):
|
|||
# instead of just formats.
|
||||
# This fixes incorrect format selection issue (see
|
||||
# https://github.com/rg3/youtube-dl/issues/10083).
|
||||
incomplete_formats = all(
|
||||
incomplete_formats = (
|
||||
# All formats are video-only or
|
||||
f.get('vcodec') != 'none' and f.get('acodec') == 'none' or
|
||||
all(f.get('vcodec') != 'none' and f.get('acodec') == 'none' for f in formats) or
|
||||
# all formats are audio-only
|
||||
f.get('vcodec') == 'none' and f.get('acodec') != 'none'
|
||||
for f in formats)
|
||||
all(f.get('vcodec') == 'none' and f.get('acodec') != 'none' for f in formats))
|
||||
|
||||
ctx = {
|
||||
'formats': formats,
|
||||
|
|
Loading…
Reference in a new issue