mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 15:16:52 +01:00
Ignore empty entries in _list_from_options_callback
This commit is contained in:
parent
77c4a9ef68
commit
1f8471e22c
@ -119,7 +119,7 @@ def _format_option_string(option):
|
||||
def _list_from_options_callback(option, opt_str, value, parser, append=True, delim=',', process=str.strip):
|
||||
# append can be True, False or -1 (prepend)
|
||||
current = getattr(parser.values, option.dest) if append else []
|
||||
value = [process(value)] if delim is None else list(map(process, value.split(delim)))
|
||||
value = list(filter(None, [process(value)] if delim is None else map(process, value.split(delim))))
|
||||
setattr(
|
||||
parser.values, option.dest,
|
||||
current + value if append is True else value + current)
|
||||
|
Loading…
Reference in New Issue
Block a user