Generate preview thumbnails as soon as Sonarr or Radarr imports a file

Add a Sonarr or Radarr webhook for import and upgrade. Previews are made after a 60 s quiet period, with retries while the server indexes the file.

In Sonarr or Radarr, add a Webhook connection that points at Media Preview Generator. Enable the import and upgrade events. When a file lands, the app waits for a quiet period (60 seconds by default), then makes previews for just those files. It publishes them to every Plex, Emby or Jellyfin server that has the file. If a server hasn't added the file to its library yet, the app retries automatically.

Set it up

  1. In Media Preview Generator, open Automation → Triggers and copy the Radarr or Sonarr Webhook URL.
  2. In Radarr or Sonarr, go to Settings → Connect → + → Webhook.
  3. Paste the URL and enable the events:
    • Radarr: On Import and On Upgrade.
    • Sonarr: On File Import and On File Upgrade.
  4. Authentication: leave Username empty and put your API token or webhook secret in Password. If the form has a Headers section, you can use an X-Auth-Token header instead.
  5. Click Test, then Save. The test shows up under Tools → Webhook Activity.

Field-by-field steps: Configure Radarr and Configure Sonarr. To use a separate secret for webhooks, see Webhook Secret.

Tip

Sonarr and Radarr often see paths differently from your media server and from this container, for example /tv/... against /data/tv/.... Fill in the webhook column of the server's path mapping so the paths line up. See the FAQ entry on the webhook path column and Path Mappings.

What the app accepts

What happens after the webhook

  1. Batching. Files are queued per source. A batch runs once the delay (default 60 seconds, range 10–300) passes with no new files from that source. Each new file restarts the timer. A season pack becomes one job. See Batching and the delay.
  2. Finding the servers. Each path is mapped to the container's view. Then every configured server whose enabled libraries contain the file is found. A path outside every enabled library is skipped, not retried.
  3. One decode. FFmpeg runs once per file on a worker for a device allowed to run previews: a GPU, or the CPU if you have no GPU.
  4. Publishing. Each server that owns the file gets its own format:
    • Plex: a BIF in its config folder.
    • Emby: a BIF next to the video.
    • Jellyfin: trickplay tiles, next to the video or in Jellyfin's data folder if you chose off-media storage.
  5. Queue priority. New imports run at High priority by default (Settings → Processing options → Incoming job priority). They overtake a running full-library scan file by file, without cancelling it (details).

Retries for files the server hasn't indexed yet

Sonarr and Radarr often call the webhook before your media server has scanned the new file. Plex in particular can't take a preview until its scan creates the item.

To shorten the wait, make sure the server notices new files quickly:

Setup Health checks these.

Upgrades

On an upgrade, Sonarr and Radarr send the new file along with the file it replaced. The app makes previews for the new file. It also removes the old file's sidecar output next to the media (the Emby BIF and the Jellyfin trickplay folder), so stale previews don't pile up.

The Plex direct webhook and the Recently Added poll only see new library items, not in-place upgrades. For upgrades, the Sonarr/Radarr webhook is the trigger that works (why).

Troubleshooting

More in the troubleshooting table.

Edit this page on GitHub
Type to search the documentation.