aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-08-24 03:15:44 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-08-24 04:24:12 +0530
commit330690a214e5a9b6bebcfe9f7e46ebd8ffe77f03 (patch)
tree73c0c44bf711a02e23f86ff6c1001fbcb0b6588f /yt_dlp/utils.py
parent91d4b32bb621a6fe1e426ebb2fecca5ef0e46f52 (diff)
downloadhypervideo-pre-330690a214e5a9b6bebcfe9f7e46ebd8ffe77f03.tar.lz
hypervideo-pre-330690a214e5a9b6bebcfe9f7e46ebd8ffe77f03.tar.xz
hypervideo-pre-330690a214e5a9b6bebcfe9f7e46ebd8ffe77f03.zip
[downloader/ffmpeg] Allow passing custom arguments before -i
Closes #686
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 61878b8d7..04c280ba3 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -4987,6 +4987,18 @@ def cli_configuration_args(argdict, keys, default=[], use_compat=True):
return [arg for args in arg_list for arg in args]
return default
+def _configuration_args(main_key, argdict, exe, keys=None, default=[], use_compat=True):
+ main_key, exe = main_key.lower(), exe.lower()
+ root_key = exe if main_key == exe else f'{main_key}+{exe}'
+ keys = [f'{root_key}{k}' for k in (keys or [''])]
+ if root_key in keys:
+ if main_key != exe:
+ keys.append((main_key, exe))
+ keys.append('default')
+ else:
+ use_compat = False
+ return cli_configuration_args(argdict, keys, default, use_compat)
+
class ISO639Utils(object):
# See http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt