Skip to content

Post-Processing

Post-processing scripts run after Scryer places a file in its library. Use them for anything Scryer does not do itself: tagging, transcoding, remote sync, or custom notifications.

  • To access: Settings → Post-processing
  • To view: Requires manageCatalogSettings app permission

Each script has:

  • Script type: inline shell content stored in Scryer, or file pointing at a script on disk. Inline shell requires an explicit acknowledgement because it runs with Scryer’s privileges.
  • Applied facets: which of Movies, Series, and Anime trigger it.
  • Execution mode: blocking waits for the script before the import is marked complete; fire_and_forget starts it and moves on.
  • Timeout: seconds before Scryer kills the process tree. Blocking scripts that time out are recorded as such.
  • Priority: order when several scripts apply to one import.
  • Enabled and Debug: debug keeps stdout and stderr tails on the run record.

Scryer sets these environment variables for every run:

VariableContents
SCRYER_EVENTAlways post_import
SCRYER_FILE_PATHFinal path of the imported file
SCRYER_FACETmovie, series, or anime
SCRYER_TITLE_IDScryer’s title identifier
SCRYER_TITLE_NAMETitle name
SCRYER_METADATAJSON with the full context: year, IMDb and TVDB ids, season, episode, quality, and more

The working directory is the imported file’s directory. Parse SCRYER_METADATA for anything not exposed as its own variable.

Every execution is stored with status (success, failed, timeout), exit code, duration, the environment payload, and, with debug on, output tails. Read them from the Post-processing page when a script misbehaves before changing the script itself.

  • Keep scripts idempotent. Upgrades and manual re-imports run them again for the same title.
  • Prefer fire_and_forget for slow work such as transcodes so imports do not queue behind it.
  • If you rename with the recycle bin enabled, scripts see the final path, not the recycled one.
  • Rename templates run before scripts, so change templates first and re-check one import.
  • Media Servers covers library refreshes, which do not need a script.
  • Import explains the step that precedes post-processing.