diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2013-07-08 12:10:47 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2013-10-11 16:34:48 +0200 |
commit | 99e206d508646b183ef315da162147ed6fd75442 (patch) | |
tree | e9b98d0f96c0f4fdc7ccdd3f7d61cafa21e84723 | |
parent | dd82ffea0c3a0dcf67f8e9fca7226de3a2899425 (diff) | |
download | youtube-dl-99e206d508646b183ef315da162147ed6fd75442.tar.gz youtube-dl-99e206d508646b183ef315da162147ed6fd75442.zip |
Implement the max quality option in YoutubeDL
-rw-r--r-- | youtube_dl/YoutubeDL.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index feb105861..d88378dda 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -469,6 +469,10 @@ class YoutubeDL(object): self.list_formats(info_dict) return + format_limit = self.params.get('format_limit', None) + if format_limit: + formats = [f for f in formats if f['format_id'] <= format_limit] + req_format = self.params.get('format', 'best') formats_to_download = [] if req_format == 'best' or req_format is None: |