1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-03-07 14:49:56 +00:00

Add option --exec-before-download

Closes #530
This commit is contained in:
pukkandan
2021-07-19 23:26:22 +05:30
parent 8d9b902243
commit 5520aa2dc9
4 changed files with 15 additions and 1 deletions

View File

@@ -415,6 +415,13 @@ def _real_main(argv=None):
# Run this before the actual video download
'when': 'before_dl'
})
# Must be after all other before_dl
if opts.exec_before_dl_cmd:
postprocessors.append({
'key': 'ExecAfterDownload',
'exec_cmd': opts.exec_before_dl_cmd,
'when': 'before_dl'
})
if opts.extractaudio:
postprocessors.append({
'key': 'FFmpegExtractAudio',