1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-11-20 20:32:57 +08:00

Implement the max quality option in YoutubeDL

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-07-08 12:10:47 +02:00
parent dd82ffea0c
commit 99e206d508

View File

@ -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: