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
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698
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',