From 1f8471e22cdb5181aa19b0c63523ad96891ea2dd Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 24 Sep 2021 05:10:33 +0530 Subject: [PATCH] Ignore empty entries in `_list_from_options_callback` --- yt_dlp/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/options.py b/yt_dlp/options.py index 74c810471..80b3df74f 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -119,7 +119,7 @@ def parseOpts(overrideArguments=None): 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)