Random collection of scripts and configuration files used by *arr tools in my setup
Automatically switches movies from a Remux-only profile to a WebDL-enabled profile when no physical release appears within a statistically determined threshold (P95 of the web-to-physical gap, computed from your own library).
Movies that wait longer than the threshold for a physical release are unlikely to ever get one. The script switches their profile so Radarr can grab a WebDL release instead of leaving them in permanent limbo.
curlandjq1.6+ (installed by default on most systems)- Radarr API URL and key configured in
scripts.conf
Install jq if missing:
# FreeBSD
pkg install jq
# Debian / Ubuntu
apt install jq
# Fedora / RHEL
dnf install jq
# macOS
brew install jq- Copy and edit the config:
cp radarr/connect/scripts.conf.sample radarr/connect/scripts.conf-
Set
RADARR_API_URLandRADARR_API_KEYinscripts.conf. SetSOURCE_PROFILE_NAMEandTARGET_PROFILE_NAMEto match your Radarr quality profile names exactly (case-sensitive). -
Run in dry-run mode (default) to preview what would switch:
./radarr/auto_quality_switch.sh- Run with
--applyto actually switch profiles:
./radarr/auto_quality_switch.sh --applyAfter initial setup, run --migrate once to fix existing movies that
already have downloaded files on the wrong profile:
# Preview what migration would do
./radarr/auto_quality_switch.sh --migrate
# Apply migration
./radarr/auto_quality_switch.sh --migrate --applyMigration checks each movie's file quality source:
- WebDL/WebRip files — switches profile automatically
- Other files (Bluray, Remux, HDTV, etc.) — logged to stderr for manual review
Migration never triggers search — review the logged movies first.
| Flag | Effect |
|---|---|
--apply |
Actually switch profiles (overrides DRY_RUN config) |
--migrate |
One-time library migration mode |
-n, --dry-run |
Preview mode, no changes (default) |
-j, --json |
Output machine-readable JSON |
-q, --quiet |
Only errors and counts, no per-movie list |
-d, --debug |
Verbose debug logging to stderr |
Add to crontab for daily automated runs:
# Dry-run first — review the log for a week
0 6 * * * /path/to/radarr/auto_quality_switch.sh >> /var/log/quality-switch.log 2>&1
# Then switch to apply mode
0 6 * * * /path/to/radarr/auto_quality_switch.sh --apply >> /var/log/quality-switch.log 2>&1Switches movies back to Remux-only profiles when physical release dates
appear for movies previously switched by the forward script. Uses a Radarr
tag (auto-switched) to track which movies were switched.
Run weekly — physical releases don't appear daily.
- Uses the same
scripts.confas the forward script. - Preview candidates:
./radarr/auto_quality_switch_reverse.sh- Apply reverse switch:
./radarr/auto_quality_switch_reverse.sh --applyThe reverse script switches the profile and triggers a search for the Remux release. Radarr handles the rest — downloads the Remux, removes the old WebDL file.
# Weekly, Sunday at 7am
0 7 * * 0 /path/to/radarr/auto_quality_switch_reverse.sh --apply >> /var/log/quality-switch-reverse.log 2>&1Same as the forward script (see table above), except --migrate is not
available on the reverse script.
Configuration file used by all Connect scripts and the auto quality switch
scripts. Copy to scripts.conf and edit:
cp radarr/connect/scripts.conf.sample radarr/connect/scripts.confSee the sample file for all available settings with documentation.
This project follows Conventional Commits and the conventions documented in AGENTS.md.
If you need more features or better maintained taggers, check out the Radarr DV HDR Tagarr from TRaSH-. It offers more extensive functionality and active development.
Script and supporting files to be used as Connect / postprocess scripts in radarr.
Script to be run with:
- On File Import
- On File Upgrade
- On Movie File Delete
Script will tag the movie with fel or mel if the file
contains a Dolby Vision Enhancement Layer, and whether the EL
is minimal or full.
If the imported file has no Enhancement Layer, and the movie has one of
those two tags, it will be removed.
The script can also be run as:
$ ./tag_dvfelmel.sh bulkIf run like this, it will loop over all movies in radarr and add/remove the tags where needed. Can be used to backfill all the tags for an existing library.
Script to be run with:
- On Movie Add
- On File Import
- On File Upgrade
Script will search TMDB for official trailers for the movie and download
them in the best available quality using yt-dlp.
Trailers are saved in a Trailers/ subdirectory inside the movie folder.
By default it downloads trailers in the movie's original language and
Brazilian Portuguese (pt-BR), with Brazilian Portuguese subtitles for
original-language trailers. These preferences can be configured in
scripts.conf.
Requires a TMDB API key (set TMDB_API_KEY in scripts.conf).
Get one at https://www.themoviedb.org/settings/api
For age-restricted content, YouTube cookie authentication is supported. See cookie extraction guide for setup.
The script can also be run as:
$ ./download_trailer.sh bulkIf run like this, it will loop over all movies in radarr and download trailers where needed. Can be used to backfill trailers for an existing library.