mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-24 18:05:07 +00:00
feat(dl): run user post-download scripts with metadata variables
New post_scripts config and repeatable --postscript flag run a command per output, season/album folder, or run, substituting filename-template variables into pre-tokenized argv. The REST API rejects hook commands. Closes #150
This commit is contained in:
@@ -360,6 +360,10 @@ def perform_download(
|
||||
]
|
||||
config.directories.cache = config.directories.cache / "_jobs" / cred_hash
|
||||
|
||||
for banned in ("postscript", "post_script", "post_scripts"):
|
||||
if params.pop(banned, None) is not None:
|
||||
log.warning(f"Ignoring '{banned}' in API download parameters; post-scripts are config-only")
|
||||
|
||||
vcodec_raw = params.get("vcodec")
|
||||
if vcodec_raw:
|
||||
if isinstance(vcodec_raw, str):
|
||||
|
||||
Reference in New Issue
Block a user