mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-07-02 12:02:52 -05:00
Extend #980 with --max-quality support
This commit is contained in:
@ -488,7 +488,9 @@ class YoutubeDL(object):
|
||||
|
||||
format_limit = self.params.get('format_limit', None)
|
||||
if format_limit:
|
||||
formats = [f for f in formats if f['format_id'] <= format_limit]
|
||||
formats = list(takewhile_inclusive(
|
||||
lambda f: f['format_id'] != format_limit, formats
|
||||
))
|
||||
if self.params.get('prefer_free_formats'):
|
||||
def _free_formats_key(f):
|
||||
try:
|
||||
|
Reference in New Issue
Block a user