Merge branch 'ceskatelevizesrt' of https://github.com/oskar456/youtube-dl into oskar4...
[youtube-dl] / youtube_dl / YoutubeDL.py
index e2b823f667f71196f375a8c4c56f061403ade27f..806e7b239cec05e1724dc58e74aca1af671981cf 100755 (executable)
@@ -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)'