IMPORTANT: This tool was created to fix an issue in the way Radarr v2 was dealing with custom formats while importing the downloaded files, as explained bellow. That issue is solved in the way Radarr v3 processes the downloaded files, hence this tool isn't nor compatible neither needed for Radarr v3.
Radarr Custom Format Sync checks Radarr history to correlate downloaded releases with the imported ones in order to put back all custom formats that might have been lost after the importing process.
Radarr custom formats are very useful for use cases such as downloading a movie in original version as soon as it's available and upgrading it once a Dual version is released. In order to work with trackers that don't have standardized namings, Jackett is able to append some information such as language codes to the release name so then Radarr can pick the best release.
The problem is that any information that Jackett adds to the release name is not reflected on the imported release once it's downloaded and imported by Radarr as Radarr only uses the filename for assigning the custom formats.
Assuming a custom format named Dual
applied to movies that are both [spanish]
and [english]
and a release named DeadPool (2016)
:
- Jackett finds
DeadPool (2016)
in a custom tracker and appends the language flags returning to Radarr the release nameDeadPool (2016) [spanish] [english]
- Radarr decides to download
DeadPool (2016) [spanish] [english]
as it's the one that matches theDual
custom format - After the download is finished Radarr imports the release, but its release name is
DeadPool (2016)
so it doesn't add theDual
custom format to it.
This script solves this problem, checking the custom formats of each imported movie in the Radarr library and replacing it by the custom formats of the grabbed release instead.
Optionally, it's possible to append strings to the filenames when they match a custom format. This is very useful to guarantee that, in case of reimporting the file, the custom formats won't be lost.
[Radarr]
url = http://changeme.com:3333
key = 4384803r2808rvsvj023r9fjvvd0fjv3
[Append]
english = [english]
spanish = [spanish]
dual = [dual]
- Edit the Config.txt file and replace your servers URL and API key for Radarr under the
[Radarr]
section. - Optionally, add flags to append to the file names per custom format (useful for possible reimports where history gets lost)
- Alternatively, if running the application with Docker, provide the values as the envars
RADARR_URL
andRADARR_KEY
(TheConfig.txt
file will be generated automatically inside the container) - Optionally, add the flags to append to the file names as envars
APPEND_X
beingX
the custom format name (case insensitive). For example:APPEND_ENGLISH=[english]
will append[english]
to file names with custom formatenglish
Recomended to run using cron every 15 minutes or an interval of your preference.
pip install -r requirements.txt
python CustomFormatSync.py
docker run -d --name radarr-custom-format-sync \
--restart=unless-stopped \
-v /path/to/logs:/logs \
-e RADARR_URL=yourRadarrUrl \
-e RADARR_KEY=yourRadarrKey \
-e DELAY=15m \
rubasace/radarr-custom-format-sync
- Python 3.4 or greater
- Radarr v2 server