diff --git a/youtube_dlc/__init__.py b/youtube_dlc/__init__.py index 2072165ce6..5bf54b5563 100644 --- a/youtube_dlc/__init__.py +++ b/youtube_dlc/__init__.py @@ -326,7 +326,12 @@ def parse_retries(retries): 'exec_cmd': opts.exec_cmd, }) + _args_compat_warning = 'WARNING: %s given without specifying name. The arguments will be given to all %s\n' + if 'default' in opts.external_downloader_args: + write_string(_args_compat_warning % ('--external-downloader-args', 'external downloaders'), out=sys.stderr), + if 'default-compat' in opts.postprocessor_args and 'default' not in opts.postprocessor_args: + write_string(_args_compat_warning % ('--post-processor-args', 'post-processors'), out=sys.stderr), opts.postprocessor_args.setdefault('sponskrub', []) opts.postprocessor_args['default'] = opts.postprocessor_args['default-compat'] diff --git a/youtube_dlc/options.py b/youtube_dlc/options.py index cb8e8c06dd..7a30882f19 100644 --- a/youtube_dlc/options.py +++ b/youtube_dlc/options.py @@ -640,7 +640,9 @@ def _dict_from_multiple_values_options_callback( '--downloader-args', '--external-downloader-args', metavar='NAME:ARGS', dest='external_downloader_args', default={}, type='str', action='callback', callback=_dict_from_multiple_values_options_callback, - callback_kwargs={'default_key': 'default', 'process': compat_shlex_split}, + callback_kwargs={ + 'allowed_keys': '|'.join(list_external_downloaders()), + 'default_key': 'default', 'process': compat_shlex_split}, help=( 'Give these arguments to the external downloader. ' 'Specify the downloader name and the arguments separated by a colon ":". '