Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Script] Change Sonarr .nfo to another language than english included images

Featured Replies

This tool, developed in Python and then packaged as a standalone binary with PyInstaller, is designed to analyze a TV series directory whose .nfo metadata files were generated by Sonarr. Its purpose is to read these metadata files and use the TMDB API to automatically replace the contents of the <title> and <plot> tags in the language of your choice.

Optionally, the program can also retrieve localized images in that same language when they are available on TMDB. It therefore makes it possible to fully relocalize the textual metadata, and potentially the visual assets as well, of a TV series library already

structured by Sonarr.

Download and install

wget https://codeberg.org/waazaa/unraid-packages/raw/branch/main/sonarr-nfo-localizer/sonarr-nfo-localizer-Unraid.txz && installpkg sonarr-nfo-localizer-Unraid.txz

This package contains a binary built with PyInstaller from the following Python script:

https://codeberg.org/waazaa/sonarr-metadata-localizer/src/branch/main/root/app/nfo_jellyfin.py

This makes it possible to avoid installing dependencies such as a Python environment.

How it works

Once the package is installed, you can access the sonarr-nfo-localizer application and use it as follows.

First, create a configuration file, for example .env, containing the environment variables below. You can then adjust each value to match your needs:

export TMDB_API_KEY=27xxxxxxxxxxxxxxxxxxxc

export TMDB_LANGUAGE=fr-FR

export TMDB_IMAGE_LANGUAGE=fr,null

export DOWNLOAD_IMAGES=true

export SKIP_EMPTY=true

export UPDATE_SHOW_TITLE=false

export SERIES_COVER_NAME=cover.jpg

export SERIES_POSTER_NAME=poster.jpg

export SERIES_BACKDROP_NAME=backdrop.jpg

export SERIES_LOGO_NAME=logo.png

export SLEEP_BETWEEN_REQUESTS=0.25

export HTTP_TIMEOUT=25

Variable description

  • TMDB_API_KEY: Your TMDB API key, required to query TMDB.

  • TMDB_LANGUAGE: The language to use for textual metadata retrieved from TMDB, such as titles and plots. Example: fr-FR

  • TMDB_IMAGE_LANGUAGE: The preferred language for localized images. The value fr,null means the tool will first look for French images, then fall back to images without a specified language if none are available.

  • DOWNLOAD_IMAGES: Enables or disables image downloading. Set it to true to download localized images, or false to skip them.

  • SKIP_EMPTY: If set to true, the tool will avoid replacing existing fields with empty values returned by TMDB.

  • UPDATE_SHOW_TITLE: If set to true, the series title will also be updated. If set to false, the existing title will be kept unchanged.

  • SERIES_COVER_NAME: Output filename to use for the series cover image.

  • SERIES_POSTER_NAME: Output filename to use for the series poster image.

  • SERIES_BACKDROP_NAME: Output filename to use for the series backdrop image.

  • SERIES_LOGO_NAME: Output filename to use for the series logo image.

  • SLEEP_BETWEEN_REQUESTS: Delay, in seconds, inserted between API requests in order to avoid hitting TMDB too aggressively.

  • HTTP_TIMEOUT: Maximum HTTP timeout, in seconds, for API and image download requests.

Running the command

Once your configuration file is ready, launch the tool with:

source .env && sonarr-nfo-localizer /path/to/tvshows

This command loads the environment variables from the .env file and then runs sonarr-nfo-localizer against the target directory containing your TV shows.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.