diff options
Diffstat (limited to 'youtube_dlc/downloader/external.py')
-rw-r--r-- | youtube_dlc/downloader/external.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/youtube_dlc/downloader/external.py b/youtube_dlc/downloader/external.py index 8cd0511fc..2ae153f4a 100644 --- a/youtube_dlc/downloader/external.py +++ b/youtube_dlc/downloader/external.py @@ -95,7 +95,19 @@ class ExternalFD(FileDownloader): return cli_valueless_option(self.params, command_option, param, expected_value) def _configuration_args(self, default=[]): - return cli_configuration_args(self.params, 'external_downloader_args', default) + args = self.params.get('external_downloader_args', {}) + if isinstance(args, (list, tuple)): # for backward compatibility + return args + if args is None: + return default + assert isinstance(args, dict) + + dl_args = args.get(self.get_basename().lower()) + if dl_args is None: + dl_args = args.get('default', default) + assert isinstance(dl_args, (list, tuple)) + return dl_args + def _call_downloader(self, tmpfilename, info_dict): """ Either overwrite this or implement _make_cmd """ |