From 2bb77ea18846d3a349e06def63dcc5aeeb2a0cfa Mon Sep 17 00:00:00 2001 From: <> Date: Wed, 26 Aug 2026 01:59:28 +0000 Subject: [PATCH] Deployed b94f338 with MkDocs version: 1.6.1 --- 404.html | 2 +- dev/creating-a-service/index.html | 2 +- dev/rest-api/authentication/index.html | 2 +- dev/rest-api/endpoints/index.html | 6 +- dev/rest-api/errors/index.html | 2 +- dev/rest-api/index.html | 2 +- dev/rest-api/job-lifecycle/index.html | 2 +- dev/rest-api/quickstart/index.html | 2 +- dev/rest-api/remote-sessions/index.html | 2 +- dev/service-architecture/index.html | 2 +- getting-started/configuration-file/index.html | 4 +- getting-started/installation/index.html | 2 +- getting-started/quickstart/index.html | 2 +- guide/cli-reference/index.html | 4 +- guide/downloading/index.html | 12 ++-- guide/drm-and-cdm/index.html | 2 +- guide/output-and-naming/index.html | 2 +- guide/proxies-and-vpn/index.html | 2 +- guide/subtitles/index.html | 2 +- guide/troubleshooting/index.html | 2 +- guide/vaults/index.html | 2 +- index.html | 2 +- reference/api/config/index.html | 2 +- reference/api/drm/index.html | 2 +- reference/api/service/index.html | 2 +- reference/api/titles/index.html | 2 +- reference/api/tracks/index.html | 2 +- .../configuration/directories/index.html | 2 +- reference/configuration/download/index.html | 2 +- reference/configuration/drm/index.html | 2 +- reference/configuration/example/index.html | 2 +- reference/configuration/index.html | 4 +- reference/configuration/misc/index.html | 6 +- reference/configuration/network/index.html | 2 +- reference/configuration/output/index.html | 2 +- .../configuration/post-scripts/index.html | 72 +++++++++---------- reference/configuration/services/index.html | 2 +- reference/configuration/vaults/index.html | 6 +- search/search_index.json | 2 +- 39 files changed, 88 insertions(+), 88 deletions(-) diff --git a/404.html b/404.html index 1d784e52..c8a1f008 100644 --- a/404.html +++ b/404.html @@ -1175,7 +1175,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/creating-a-service/index.html b/dev/creating-a-service/index.html index 8404a549..8afb4b62 100644 --- a/dev/creating-a-service/index.html +++ b/dev/creating-a-service/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/rest-api/authentication/index.html b/dev/rest-api/authentication/index.html index 850079fc..2dab4733 100644 --- a/dev/rest-api/authentication/index.html +++ b/dev/rest-api/authentication/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/rest-api/endpoints/index.html b/dev/rest-api/endpoints/index.html index 52f6f312..9a8d6332 100644 --- a/dev/rest-api/endpoints/index.html +++ b/dev/rest-api/endpoints/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts @@ -3785,9 +3785,9 @@ ignore it safely. See Split e

Rejected parameters

postscript, post_script and post_scripts are never accepted. A body containing any of them gets 400 INVALID_PARAMETERS, because a command string that arrives from -an HTTP caller would be remote code execution. You configure post-download hooks only in +an HTTP caller would be remote code execution. You configure post-scripts only in unshackle.yaml, where they still operate for API jobs. See -Post-download scripts.

+Post-scripts.

Gated parameters (developer)

diff --git a/dev/rest-api/errors/index.html b/dev/rest-api/errors/index.html index 1493e90a..a6809337 100644 --- a/dev/rest-api/errors/index.html +++ b/dev/rest-api/errors/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/rest-api/index.html b/dev/rest-api/index.html index f256a281..4ef6dc4d 100644 --- a/dev/rest-api/index.html +++ b/dev/rest-api/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/rest-api/job-lifecycle/index.html b/dev/rest-api/job-lifecycle/index.html index 6441ce6f..6b30a68f 100644 --- a/dev/rest-api/job-lifecycle/index.html +++ b/dev/rest-api/job-lifecycle/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/rest-api/quickstart/index.html b/dev/rest-api/quickstart/index.html index 8d58f208..ce44e43e 100644 --- a/dev/rest-api/quickstart/index.html +++ b/dev/rest-api/quickstart/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/rest-api/remote-sessions/index.html b/dev/rest-api/remote-sessions/index.html index d99379c3..8895969e 100644 --- a/dev/rest-api/remote-sessions/index.html +++ b/dev/rest-api/remote-sessions/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/dev/service-architecture/index.html b/dev/service-architecture/index.html index 64e9543c..bb683d00 100644 --- a/dev/service-architecture/index.html +++ b/dev/service-architecture/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/getting-started/configuration-file/index.html b/getting-started/configuration-file/index.html index d14b4689..4145cbef 100644 --- a/getting-started/configuration-file/index.html +++ b/getting-started/configuration-file/index.html @@ -1345,7 +1345,7 @@ - Post-Download Scripts + Post-Scripts @@ -2290,7 +2290,7 @@ update_checks, redact_paths, debug, unicode_filenames -Post-download scripts +Post-scripts post_scripts diff --git a/getting-started/installation/index.html b/getting-started/installation/index.html index bfb1bcb4..c10412df 100644 --- a/getting-started/installation/index.html +++ b/getting-started/installation/index.html @@ -1390,7 +1390,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/getting-started/quickstart/index.html b/getting-started/quickstart/index.html index 6863d988..9e26a56f 100644 --- a/getting-started/quickstart/index.html +++ b/getting-started/quickstart/index.html @@ -1373,7 +1373,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/guide/cli-reference/index.html b/guide/cli-reference/index.html index 29a97624..f67aa35b 100644 --- a/guide/cli-reference/index.html +++ b/guide/cli-reference/index.html @@ -1694,7 +1694,7 @@ - Post-Download Scripts + Post-Scripts @@ -3219,7 +3219,7 @@ configuration file.

--postscript -Run a command after each output file, with {variable} placeholders substituted. Repeatable. Replaces the post_scripts config for this run. See Post-download scripts. +Run a command after each output file, with {variable} placeholders substituted. Repeatable. Replaces the post_scripts config for this run. See Post-scripts. diff --git a/guide/downloading/index.html b/guide/downloading/index.html index 435c2928..6d912f4f 100644 --- a/guide/downloading/index.html +++ b/guide/downloading/index.html @@ -1789,7 +1789,7 @@ - Post-Download Scripts + Post-Scripts @@ -3841,13 +3841,13 @@ Read Music output files.<

After the download

--postscript "<command>" runs your own command once per output file, with unshackle's metadata substituted into {variable} placeholders. It is repeatable, and it replaces the -post_scripts config for that run. No success hook operates under --no-mux, because -that run writes no muxed output. A failure hook still operates if the download fails.

+post_scripts config for that run. No success post-script operates under --no-mux, because +that run writes no muxed output. A failure post-script still operates if the download fails.

Hand each finished file to an uploader
unshackle dl --postscript "python /opt/upload.py {filepath} --service={service}" EXAMPLE 81234567
 
-

For hooks that continue across runs, for the season and run modes, for failure hooks -and for the full variable list, see -Post-download scripts.

+

For post-scripts that continue across runs, for the season and run modes, for failure +post-scripts and for the full variable list, see +Post-scripts.

Naming tags

  • --tag: set the release group tag (overrides the configured tag).
  • diff --git a/guide/drm-and-cdm/index.html b/guide/drm-and-cdm/index.html index c202711a..52ac0321 100644 --- a/guide/drm-and-cdm/index.html +++ b/guide/drm-and-cdm/index.html @@ -1512,7 +1512,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/guide/output-and-naming/index.html b/guide/output-and-naming/index.html index 5f944888..2516278f 100644 --- a/guide/output-and-naming/index.html +++ b/guide/output-and-naming/index.html @@ -1506,7 +1506,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/guide/proxies-and-vpn/index.html b/guide/proxies-and-vpn/index.html index 37f7044e..c62d9ed2 100644 --- a/guide/proxies-and-vpn/index.html +++ b/guide/proxies-and-vpn/index.html @@ -1478,7 +1478,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/guide/subtitles/index.html b/guide/subtitles/index.html index 592b2438..c31739f1 100644 --- a/guide/subtitles/index.html +++ b/guide/subtitles/index.html @@ -1468,7 +1468,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/guide/troubleshooting/index.html b/guide/troubleshooting/index.html index e48cf126..80c8884d 100644 --- a/guide/troubleshooting/index.html +++ b/guide/troubleshooting/index.html @@ -1423,7 +1423,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/guide/vaults/index.html b/guide/vaults/index.html index f7731c73..82b61e69 100644 --- a/guide/vaults/index.html +++ b/guide/vaults/index.html @@ -1417,7 +1417,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/index.html b/index.html index 9ff777a2..6e842f1b 100644 --- a/index.html +++ b/index.html @@ -1288,7 +1288,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/api/config/index.html b/reference/api/config/index.html index 046f07d0..8be7cfba 100644 --- a/reference/api/config/index.html +++ b/reference/api/config/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/api/drm/index.html b/reference/api/drm/index.html index bfab8f9f..85f5d4e2 100644 --- a/reference/api/drm/index.html +++ b/reference/api/drm/index.html @@ -1186,7 +1186,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/api/service/index.html b/reference/api/service/index.html index 33ba1598..a9c977d7 100644 --- a/reference/api/service/index.html +++ b/reference/api/service/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/api/titles/index.html b/reference/api/titles/index.html index 5f3d0129..6441d6c7 100644 --- a/reference/api/titles/index.html +++ b/reference/api/titles/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/api/tracks/index.html b/reference/api/tracks/index.html index c7b1732f..e00c1582 100644 --- a/reference/api/tracks/index.html +++ b/reference/api/tracks/index.html @@ -1188,7 +1188,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/configuration/directories/index.html b/reference/configuration/directories/index.html index f373ccc5..27b947f9 100644 --- a/reference/configuration/directories/index.html +++ b/reference/configuration/directories/index.html @@ -1251,7 +1251,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/configuration/download/index.html b/reference/configuration/download/index.html index 04968b20..4a3da32d 100644 --- a/reference/configuration/download/index.html +++ b/reference/configuration/download/index.html @@ -1317,7 +1317,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/configuration/drm/index.html b/reference/configuration/drm/index.html index bccb648c..7809945b 100644 --- a/reference/configuration/drm/index.html +++ b/reference/configuration/drm/index.html @@ -1301,7 +1301,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/configuration/example/index.html b/reference/configuration/example/index.html index 49b6fdfd..78b6dfff 100644 --- a/reference/configuration/example/index.html +++ b/reference/configuration/example/index.html @@ -1193,7 +1193,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/configuration/index.html b/reference/configuration/index.html index 87aa77a9..d8ae75a0 100644 --- a/reference/configuration/index.html +++ b/reference/configuration/index.html @@ -1193,7 +1193,7 @@ - Post-Download Scripts + Post-Scripts @@ -1980,7 +1980,7 @@ default.

    key_vaults, vault_timeout -Post-download scripts +Post-scripts post_scripts diff --git a/reference/configuration/misc/index.html b/reference/configuration/misc/index.html index e5bf5f9c..82568441 100644 --- a/reference/configuration/misc/index.html +++ b/reference/configuration/misc/index.html @@ -1193,7 +1193,7 @@ - Post-Download Scripts + Post-Scripts @@ -2493,7 +2493,7 @@ setting, and KIDs, content key counts, and other metadata are always logged eith

With wait: true, unshackle waits until the script exits, then writes the exit code to the -debug log and carries on. Because the file hook runs between titles, unshackle runs one +debug log and carries on. Because the file post-script runs between titles, unshackle runs one script at a time over a season pack instead of starting them all at once. unshackle only logs the exit code: a failing script does not fail the download or change unshackle's own exit code. --postscript entries never wait.

@@ -2483,7 +2483,7 @@ string as absent. Write your script to accept an empty value for every variable. file, because SDR is the absence of an HDR tag in a filename rather than a tag that reads SDR. {edition}, {atmos}, {multi}, {dual} and {hfr} behave the same way. If your script needs the word SDR, derive it from an empty {hdr} yourself. -
  • The hook is a failure hook. A failed download has no output file to read metadata +
  • The post-script is a failure one. A failed download has no output file to read metadata from, so everything that comes from the naming context is empty. See Events.
  • @@ -2495,7 +2495,7 @@ disappearing.

    padding and the separator belong to the filename template rather than to the data.

    Music variables

    -

    A music download builds its variables from the music naming context, so a hook gets the +

    A music download builds its variables from the music naming context, so a post-script gets the release fields instead of the season and episode ones. {season}, {episode} and {episode_name} are always empty for music.

    @@ -2540,16 +2540,16 @@ release fields instead of the season and episode ones. {season},
    -

    In a file hook {title} is the track name. See Modes for what an album hook +

    In a file post-script {title} is the track name. See Modes for what an album post-script puts in {title}.

    {year} is empty when the service gives the release no year. {ext} is the container the track arrived in, such as .flac, because a music download is not muxed.

    Tagging IDs

    {tmdb}, {imdb} and {tvdb} carry the IDs unshackle tags the file with. unshackle reads -them at the moment it sends the hook, and not at the start of the run. The title search inside -the download loop finds an episode's TMDB ID, so a hook fires with it already filled in.

    +them at the moment it dispatches the post-script, and not at the start of the run. The title search +inside the download loop finds an episode's TMDB ID, so a post-script fires with it already filled in.

    They hold an ID you passed with --tmdb, --imdb or --tvdb, plus a TMDB ID the episode -search resolved. No such search runs for a movie, so a movie hook gets them empty unless you +search resolved. No such search runs for a movie, so a movie post-script gets them empty unless you passed one.

    Sidecar files

    {sidecars} holds the sidecar subtitle files written beside the output, which are the only @@ -2598,18 +2598,18 @@ copy of the sidecar files, and each invocation lists the copies sitting beside i

    season means everything this run asked for

    -

    A season hook fires when the last title this run queued for that season finishes. -With -w S01-S02 the S01 hook runs while S02 is still downloading. It says nothing -about whether the season is complete on disk. Downloading a single episode fires the -hook for that season as soon as the episode lands.

    -

    A title that fails stops the whole run. unshackle dispatches the failure hook for +

    A season post-script fires when the last title this run queued for that season +finishes. With -w S01-S02 the S01 post-script runs while S02 is still downloading. It says +nothing about whether the season is complete on disk. Downloading a single episode fires +the post-script for that season as soon as the episode lands.

    +

    A title that fails stops the whole run. unshackle dispatches the failure post-script for that title and then returns. It downloads no further title, and no season or run -hook fires after that point. This applies to every title type. If one episode of S01 -fails, the S01 hook does not fire at all.

    +post-script fires after that point. This applies to every title type. If one episode of S01 +fails, the S01 post-script does not fire at all.

    -

    unshackle attaches the hook to the folder, not to the season, so one season landing in several -folders (-q 1080,720 with a quality-dependent folder template) fires it once per folder, -each with its own {folder}. A movie is a group of its own: a season hook fires for a +

    unshackle attaches the post-script to the folder, not to the season, so one season landing in +several folders (-q 1080,720 with a quality-dependent folder template) fires it once per +folder, each with its own {folder}. A movie is a group of its own: a season post-script fires for a movie's folder as soon as the movie finishes.

    In run mode every variable except {folder} is empty, because one run can cover several shows. Only {folder} is meaningful, which makes it useful for starting a library scan @@ -2638,24 +2638,24 @@ once.

    -

    In a file hook {title} and {title_raw} are the track name. In an album hook they are -the album name, and the per-track variables {track_number}, {disc} and {isrc} are -empty, in the same way that {episode} is empty in a season hook.

    -

    An album hook obeys the same rule as a season hook. It fires when the last track this run -queued for that album lands. This does not mean that the album is complete on disk. A -one-track download fires the album hook as soon as that track lands. If a track fails, the -run stops there, so the album hook never fires, in the same way as an episode and its +

    In a file post-script {title} and {title_raw} are the track name. In an album post-script they +are the album name, and the per-track variables {track_number}, {disc} and {isrc} are +empty, in the same way that {episode} is empty in a season post-script.

    +

    An album post-script obeys the same rule as a season post-script. It fires when the last track +this run queued for that album lands. This does not mean that the album is complete on disk. +A one-track download fires the album post-script as soon as that track lands. If a track fails, +the run stops there, so the album post-script never fires, in the same way as an episode and its season.

    Events

    success runs after the file has moved to its final path. failure runs when the download fails, with {filepath} empty and {error} set. Each track of an album is its own title. -A music failure hook therefore describes the track that failed, not the release.

    +A music failure post-script therefore describes the track that failed, not the release.

    failure only fires in file mode

    A failure entry with mode: season or mode: run never runs. Leave mode at its default on a failure entry.

    -

    A failure hook has no output file to read metadata from, so it carries only what the +

    A failure post-script has no output file to read metadata from, so it carries only what the title object already knew: {title}, {title_raw}, {title_id}, {year}, {season}, {episode}, {episode_name}, {service}, the tagging IDs and {error}. Everything that comes from the naming context, such as {quality}, {hdr}, {artist} and {album}, is @@ -2664,7 +2664,7 @@ empty.

    sees your script's exit code only when that entry sets wait: true, and even then it only writes the code to the debug log. Nothing else reports a failing script. Your script owns its own error handling and logging.

    -

    A success hook always names a file this run wrote. There is no skip-if-exists path in +

    A success post-script always names a file this run wrote. There is no skip-if-exists path in dl today, so nothing fires for a title that was not downloaded.

    --postscript

    dl accepts --postscript "<command>", repeatable. Every command given this way runs with @@ -2687,7 +2687,7 @@ command itself may not cross the network.

    structured JSON debug log when that log is on.

    unshackle masks both the same way, and honours redact_paths, which is on by default. -Debug logs get shared in issue reports, and a hook command line is mostly paths. URL +Debug logs get shared in issue reports, and a post-script command line is mostly paths. URL credentials and token= / api_key= query parameters are also masked.

    Do not hardcode secrets in the command

    @@ -2697,9 +2697,9 @@ environment variable inside your script rather than putting it in the comm

    Limitations

      -
    • No success hook operates under --no-mux or --skip-dl, because neither writes a muxed - output. A failure hook still runs under --no-mux if the download itself fails.
    • -
    • failure hooks only operate in file mode.
    • +
    • No success post-script operates under --no-mux or --skip-dl, because neither writes a + muxed output. A failure post-script still runs under --no-mux if the download itself fails.
    • +
    • failure post-scripts only operate in file mode.
    • There is no webhook sender. Call curl from a script instead.
    • Script output is not captured. Redirect it inside your own script if you want a log.
    diff --git a/reference/configuration/services/index.html b/reference/configuration/services/index.html index 5aa9858c..94d4694e 100644 --- a/reference/configuration/services/index.html +++ b/reference/configuration/services/index.html @@ -1295,7 +1295,7 @@ - Post-Download Scripts + Post-Scripts diff --git a/reference/configuration/vaults/index.html b/reference/configuration/vaults/index.html index 8b6ea38d..a8211bf5 100644 --- a/reference/configuration/vaults/index.html +++ b/reference/configuration/vaults/index.html @@ -1262,7 +1262,7 @@ - Post-Download Scripts + Post-Scripts @@ -2124,13 +2124,13 @@ constructor accepts a timeout parameter (a per-vault timeout< - +