From 2e221ca3a85ec7a0c441dfcf301bf1c98614b9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Sat, 16 Jul 2016 01:18:05 +0700 Subject: [PATCH] [YoutubeDL] Fix incomplete formats check --- youtube_dl/YoutubeDL.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index cf9cd8297..6551f086f 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1396,12 +1396,11 @@ class YoutubeDL(object): # 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,