mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-22 15:57:23 +00:00
Implement the max quality option in YoutubeDL
This commit is contained in:
parent
dd82ffea0c
commit
99e206d508
1 changed files with 4 additions and 0 deletions
|
@ -469,6 +469,10 @@ class YoutubeDL(object):
|
||||||
self.list_formats(info_dict)
|
self.list_formats(info_dict)
|
||||||
return
|
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')
|
req_format = self.params.get('format', 'best')
|
||||||
formats_to_download = []
|
formats_to_download = []
|
||||||
if req_format == 'best' or req_format is None:
|
if req_format == 'best' or req_format is None:
|
||||||
|
|
Loading…
Reference in a new issue