Post-Processing Scripts
Weaver’s pipeline handles verification, repair, extraction, and the move itself. Scripts run after that, against the finished output, under the exact environment contract SABnzbd or NZBGet would give them. Existing scripts run unmodified.
Enable Execution
Section titled “Enable Execution”Execution is off by default, because an enabled script runs with Weaver’s privileges. Turn it on under Settings → Post-processing, which is marked beta. WEAVER_STRICT_SECURITY refuses script execution regardless of the switch.
The same page sets concurrency, the termination grace period after a timeout (10 seconds by default), interpreter paths for Python, PowerShell, and batch scripts, and the unacceptable extensions list that fails a job whose output matches a pattern such as *.exe.
Add Scripts
Section titled “Add Scripts”Drop a script, or a folder containing an NZBGet manifest.json, into scripts inside the data directory. In Docker that is /config/scripts. Weaver lists the folder live: adding, editing, or renaming takes effect immediately, and anything it cannot parse is listed as a problem rather than hidden.
The adapter is detected per script:
| Script carries | Contract |
|---|---|
| Nothing special | SABnzbd: SAB_* variables and the positional arguments, nonzero exit recorded as a warning |
NZBGet’s header comment or a manifest.json | NZBGet: NZBPP_*, NZBPO_*, and NZBOP_* variables, exit 93 success, 94 failure, 95 skipped |
Options declared by an NZBGet manifest are editable in the UI. Values marked secret are stored encrypted.
Script Lists
Section titled “Script Lists”A script list is the ordered set of scripts a job runs. There is one global default and an optional override per category. Entries can be disabled without removing them, and each carries its own timeout, 24 hours when unset. Weaver resolves the list when the job finishes, so a change applies to the next job to complete.
A SABnzbd or NZBGet client that names a script on submission overrides the configured list for that job.
Results
Section titled “Results”Each script’s name, outcome, duration, and the tail of its output are recorded on the job and shown in Job Detail’s event log. Outcomes are succeeded, skipped, warned, failed, cancelled, and timed out. Re-run scripts in Job Detail repeats the list against the finished output.
Related
Section titled “Related”- Pipeline And Storage defines scripts and script lists.
- Security And Access explains strict mode.
- Scryer users: Scryer has its own post-processing that runs after import, which is usually the better place for library-side scripts.