0
0
Fork 0

[YoutubeDL] Fix incomplete formats check

main
Sergey M․ 2016-07-16 01:18:05 +07:00
parent 317f7ab634
commit 2e221ca3a8
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 3 additions and 4 deletions

View File

@ -1396,12 +1396,11 @@ class YoutubeDL(object):
# instead of just formats. # instead of just formats.
# This fixes incorrect format selection issue (see # This fixes incorrect format selection issue (see
# https://github.com/rg3/youtube-dl/issues/10083). # https://github.com/rg3/youtube-dl/issues/10083).
incomplete_formats = all( incomplete_formats = (
# All formats are video-only or # 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 # all formats are audio-only
f.get('vcodec') == 'none' and f.get('acodec') != 'none' all(f.get('vcodec') == 'none' and f.get('acodec') != 'none' for f in formats))
for f in formats)
ctx = { ctx = {
'formats': formats, 'formats': formats,