aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-01-03 18:33:38 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-01-03 18:33:38 +0100
commite65566a9cc13d13bef3dc70eebfc9bda2e302b78 (patch)
tree73d3938a91f2ac0012ab11a5c124b2188c71dbcd /youtube_dl/YoutubeDL.py
parentbaa3c3f0f64b1aba523f56c9af351b6fb3378fc6 (diff)
[youtube] Correct handling when DASH manifest is not necessary to find all formats
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index e2b823f66..806e7b239 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -1333,7 +1333,9 @@ class YoutubeDL(object):
formats = info_dict.get('formats', [info_dict])
idlen = max(len('format code'),
max(len(f['format_id']) for f in formats))
- formats_s = [line(f, idlen) for f in formats]
+ formats_s = [
+ line(f, idlen) for f in formats
+ if f.get('preference') is None or f['preference'] >= -1000]
if len(formats) > 1:
formats_s[0] += (' ' if self._format_note(formats[0]) else '') + '(worst)'
formats_s[-1] += (' ' if self._format_note(formats[-1]) else '') + '(best)'