aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-07-16 01:18:05 +0700
committerSergey M․ <dstftw@gmail.com>2016-07-16 01:18:05 +0700
commit2e221ca3a85ec7a0c441dfcf301bf1c98614b9dd (patch)
tree9019d045c54820a2262280cba007ef9b158b4b95 /youtube_dl/YoutubeDL.py
parent317f7ab634174666e458807fa309a2e7ba459267 (diff)
downloadyoutube-dl-2e221ca3a85ec7a0c441dfcf301bf1c98614b9dd.tar.xz
[YoutubeDL] Fix incomplete formats check
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py7
1 files 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,