Docker image that updates Sonarr-generated NFO files using TMDb localized metadata (title/overview).
2.6K
Docker image that updates Sonarr-generated NFO files using TMDb localized metadata (title/overview), and can optionally download series artwork in Jellyfin-friendly filenames.
tvshow.nfo.tvshow.nfo (<uniqueid type="tmdb"> and a few fallback tags are supported).tvshow.nfo: <plot> (and optionally <title>)..nfo files: <title> and <plot> when the episode number can be parsed from the filename.*.bak.w500)original)original)--dry-run to preview changes without writing or downloading anything.| Variable | Default | Required | Description |
|---|---|---|---|
| TMDB_API_KEY | "" | Yes (or Bearer) | TMDb v3 API key from themoviedb.org. |
| TMDB_BEARER_TOKEN | "" | Yes (or API key) | Alternative: TMDb Bearer token (same quota). |
| TMDB_LANGUAGE | fr-FR | No | Text language for TMDb (e.g. fr-FR, en-US, es-ES). |
| TMDB_IMAGE_LANGUAGE | fr,null | No | Image language preference (e.g. fr,null, en,fr,null). |
| DOWNLOAD_IMAGES | true | No | Enable/disable image downloads (series + episodes). |
| SKIP_EMPTY | true | No | Skip TMDb empty text (don't overwrite existing plots). |
| UPDATE_SHOW_TITLE | false | No | Update tvshow.nfo with TMDb series name. |
| SERIES_COVER_NAME | cover.jpg | No | Series portrait image filename (Jellyfin). |
| SERIES_POSTER_NAME | poster.jpg | No | Series poster image (copy of cover). |
| SERIES_BACKDROP_NAME | backdrop.jpg | No | Series backdrop image filename. |
| SERIES_LOGO_NAME | logo.png | No | Series logo image filename (if available). |
| SLEEP_BETWEEN_REQUESTS | 0.25 | No | Seconds between TMDb requests (respect rate limits). |
| HTTP_TIMEOUT | 25 | No | HTTP request timeout (seconds). |
Webhook Variables
| Variable | Default | Required | Description |
|---|---|---|---|
| PORT | 8787 | No | HTTP listen port. |
| NFO_SCRIPT | /app/nfo_jellyfin.py | No | Path to NFO processing script. |
| AUTH_TOKEN | "" | No | Optional X-Auth-Token header for webhook auth. |
| ALLOWED_EVENT_TYPES | Download,Upgrade,Rename,SeriesAdd,SeriesEdit | No | Comma-separated Sonarr events to process. |
| WORKERS | 4 | No | Concurrent worker threads. |
| QUEUE_MAX | 500 | No | Maximum queued jobs. |
| DRY_RUN | false | No | Log changes without writing files/images. |
| WAIT_FOR_TVSHOWNFO_SECONDS | 60 | No | Wait for tvshow.nfo (SeriesAdd/Edit). |
| WAIT_POLL_INTERVAL | 2 | No | Poll interval when waiting (seconds). |
| MAX_RETRIES | 3 | No | Retry attempts for missing tvshow.nfo. |
| RETRY_BACKOFF_SECONDS | 20 | No | Backoff between retries. |
| LOG_LEVEL | INFO | No | DEBUG, INFO, WARNING, ERROR. |
To work reactively via a Sonarr webhook (on events like Download, Upgrade, Rename, SeriesAdd, SeriesEdit) you must add a Connect > Webhook. Select options you need and set the url : http://>:8787/sonarr
You must also set the VARIABLE AUTH_TOKEN and add a variable header on the webhook settings: X-Auth-Token with value the AUTH_TOKEN
services:
sonarr-metadata-localizer:
image: waazaafr/sonarr-metadata-localizer:latest
container_name: sonarr-metadata-localizer
hostname: sonarr-metadata-localizer
ports:
- "8787:8787"
environment:
TMDB_API_KEY: "27cXXXXYYYY88c"
AUTH_TOKEN: "supersecretforwebhookaccess"
TMDB_LANGUAGE: "fr-FR"
TMDB_IMAGE_LANGUAGE: "fr,null"
SONARR_ROOT_FOLDER: "/tv"
CRON_CHECK_INTERVAL: "0 6 * * *"
CRON_BAK_CLEANUP: "15 3 * * *"
volumes:
# IMPORTANT: must match Sonarr's series path inside Sonarr (e.g. /tv) and SONARR_ROOT_FOLDER
- /yout/series/folder/:/tv:rw
restart: unless-stopped
CRON_CHECK_INTERVAL: when the proactive scan is done
CRON_BAK_CLEANUP: when cleanup of .bak files is done
=======================================================================
Source: https://codeberg.org/waazaa/sonarr-metadata-localizer
=======================================================================
Feel free to join me on https://discord.gg/p9xkjEw8ts
If you like this, consider buing me a coffee:
https://buymeacoffee.com/waazaa
If you need an UnRAID license follow this link: https://unraid.net/pricing?via=4c3f80
Content type
Image
Digest
sha256:872d78769…
Size
55.2 MB
Last updated
7 months ago
docker pull waazaafr/sonarr-metadata-localizer