mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-06-30 11:02:51 -05:00
Extend #980 with --max-quality support
This commit is contained in:
@ -947,6 +947,15 @@ def shell_quote(args):
|
||||
return ' '.join(map(pipes.quote, args))
|
||||
|
||||
|
||||
def takewhile_inclusive(pred, seq):
|
||||
""" Like itertools.takewhile, but include the latest evaluated element
|
||||
(the first element so that Not pred(e)) """
|
||||
for e in seq:
|
||||
yield e
|
||||
if not pred(e):
|
||||
return
|
||||
|
||||
|
||||
def smuggle_url(url, data):
|
||||
""" Pass additional data in a URL for internal use. """
|
||||
|
||||
|
Reference in New Issue
Block a user