mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 15:16:52 +01:00
Warn when using old style (downloader/postprocessor)_args
This commit is contained in:
parent
256ed01025
commit
b8f6bbe68a
@ -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']
|
||||
|
||||
|
@ -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 ":". '
|
||||
|
Loading…
Reference in New Issue
Block a user