Skip to main content

Configuration Examples

Various scenarios supported using flexible configuration structure:

Update as much as possible in both Sonarr and Radarr with a single config

Create a single configuration file (use the default recyclarr.yml if you want to simplify your CLI usage by not being required to specify --config) and put all of the configuration in there. This example refers to sensitive values by using a secrets.yml file.

sonarr:
main:
base_url: !secret sonarr_url
api_key: !secret sonarr_apikey
quality_definition:
type: series
custom_formats:
- trash_ids:
# Unwanted
- 85c61753df5da1fb2aab6f2a47426b09 # BR-DISK
- 9c11cd3f07101cdba90a2d81cf0e56b4 # LQ
- e2315f990da2e2cbfc9fa5b7a6fcfe48 # LQ (Release Title)
- 47435ece6b99a0b477caf360e79ba0bb # x265 (HD)
- fbcb31d8dabd2a319072b84fc0b7249c # Extras
assign_scores_to:
- name: WEB-1080p

radarr:
main:
base_url: !secret radarr_url
api_key: !secret radarr_apikey
quality_definition:
type: movie
preferred_ratio: 0.5
custom_formats:
- trash_ids:
# HQ Release Groups
- ed27ebfef2f323e964fb1f61391bcb35 # HD Bluray Tier 01
- c20c8647f2746a1f4c4262b0fbbeeeae # HD Bluray Tier 02
- 5608c71bcebba0a5e666223bae8c9227 # HD Bluray Tier 03
- c20f169ef63c5f40c2def54abaf4438e # WEB Tier 01
- 403816d65392c79236dcb6dd591aeda4 # WEB Tier 02
- af94e0fe497124d1f9ce732069ec8c3b # WEB Tier 03
assign_scores_to:
- name: HD

Even though it's all in one file, Radarr settings are ignored when you run recyclarr sync sonarr and vice versa. To update both use recyclarr sync (without the positional argument).

Adding additional qualities to a template

Scenario: I want to use a pre-built Recyclarr template for Sonarr, but would like to add additional qualities to the profile.

Solution:

There are two options. The first is to disable the quality profile include in the template, which will stop it from syncing:

sonarr:
web-1080p-v4:
base_url: !secret sonarr_url
api_key: !secret sonarr_apikey

include:
# Comment out any of the following includes to disable them
- template: sonarr-quality-definition-series
# - template: sonarr-v4-quality-profile-web-1080p (commented out so disabled)
- template: sonarr-v4-custom-formats-web-1080p

Qualities can then be managed directly in Sonarr.

The second option is to write a new quality_profile, and add it to the template:

sonarr:
web-1080p-v4:
base_url: !secret sonarr_url
api_key: !secret sonarr_apikey

include:
# Comment out any of the following includes to disable them
- template: sonarr-quality-definition-series
- template: sonarr-v4-quality-profile-web-1080p
- template: sonarr-v4-custom-formats-web-1080p

quality_profiles:
- name: WEB-1080p
qualities:
- name: WEB 1080p
qualities:
- WEBDL-1080p
- WEBRip-1080p
- name: Bluray-1080p
- name: Bluray-720p

You must include all qualities that you want to be present in the quality profile. This is because quality_profiles replace those from a referenced include.

Synchronize a lot of custom formats for a single quality profile

Scenario: I want to be able to synchronize a list of custom formats to Radarr. In addition, I want the scores in the guide to be applied to a single quality profile.

Solution:

radarr:
main:
base_url: !secret radarr_url
api_key: !secret radarr_apikey

custom_formats:
# Advanced Audio from the guide
- trash_ids:
- 496f355514737f7d83bf7aa4d24f8169 # TrueHD ATMOS
- 2f22d89048b01681dde8afe203bf2e95 # DTS X
- 417804f7f2c4308c1f4c5d380d4c4475 # ATMOS (undefined)
- 1af239278386be2919e1bcee0bde047e # DD+ ATMOS
- 3cafb66171b47f226146a0770576870f # TrueHD
- dcf3ec6938fa32445f590a4da84256cd # DTS-HD MA
- a570d4a0e56a2874b64e5bfa55202a1b # FLAC
- e7c2fcae07cbada050a0af3357491d7b # PCM
- 8e109e50e0a0b83a5098b056e13bf6db # DTS-HD HRA
- 185f1dd7264c4562b9022d963ac37424 # DD+
- f9f847ac70a0af62ea4a08280b859636 # DTS-ES
- 1c1a4c5e823891c75bc50380a6866f73 # DTS
- 240770601cc226190c367ef59aba7463 # AAC
- c2998bd0d90ed5621d8df281e839436e # DD
assign_scores_to:
- name: HD

Manually assign different scores to multiple custom formats

Scenario: "I want to synchronize custom formats to Radarr or Sonarr. I also do not want to use the scores in the guide for some of the CFs. Instead, I want to assign my own distinct score to some custom formats in a single quality profile."

Solution:

radarr:
main:
base_url: !secret radarr_url
api_key: !secret radarr_apikey

custom_formats:
# Take scores in the guide for these 3
- trash_ids:
- 3cafb66171b47f226146a0770576870f # TrueHD
- dcf3ec6938fa32445f590a4da84256cd # DTS-HD MA
- a570d4a0e56a2874b64e5bfa55202a1b # FLAC
assign_scores_to:
- name: Ultra-HD

# Assign manual scores to the 3 below CFs, each added to the same profile
- trash_ids: [496f355514737f7d83bf7aa4d24f8169] # TrueHD ATMOS
assign_scores_to:
- name: Ultra-HD
score: 100
- trash_ids: [2f22d89048b01681dde8afe203bf2e95] # DTS X
assign_scores_to:
- name: Ultra-HD
score: 200
- trash_ids: [417804f7f2c4308c1f4c5d380d4c4475] # ATMOS (undefined)
assign_scores_to:
- name: Ultra-HD
score: 300

The configuration is structured around assigning multiple custom formats the same way to just a few quality profiles. It starts to look more redundant and ugly when you want fine-grained control over the scores, especially if its on a per-single-custom-format basis.

Assign custom format scores the same way to multiple quality profiles

You can assign custom format scores (from the guide) to multiple profiles (all the same way):

radarr:
main:
base_url: !secret radarr_url
api_key: !secret radarr_apikey

custom_formats:
- trash_ids:
- 496f355514737f7d83bf7aa4d24f8169 # TrueHD ATMOS
- 2f22d89048b01681dde8afe203bf2e95 # DTS X
- 417804f7f2c4308c1f4c5d380d4c4475 # ATMOS (undefined)
- 1af239278386be2919e1bcee0bde047e # DD+ ATMOS
- 3cafb66171b47f226146a0770576870f # TrueHD
assign_scores_to:
- name: HD
- name: Ultra-HD

Quality profiles named HD and Ultra-HD will all receive the same scores for the same custom formats.

You can also choose to override the score (for all custom formats!) in one profile:

radarr:
main:
base_url: !secret radarr_url
api_key: !secret radarr_apikey

custom_formats:
- trash_ids:
- 496f355514737f7d83bf7aa4d24f8169 # TrueHD ATMOS
- 2f22d89048b01681dde8afe203bf2e95 # DTS X
- 417804f7f2c4308c1f4c5d380d4c4475 # ATMOS (undefined)
- 1af239278386be2919e1bcee0bde047e # DD+ ATMOS
- 3cafb66171b47f226146a0770576870f # TrueHD
assign_scores_to:
- name: HD
score: 100 # This score is assigned to all 5 CFs in this profile
- name: Ultra-HD # Still uses scores from the guide

Scores in a quality profile should be set to zero if it wasn't listed in config

Scenario: "I want only the custom formats I assign to a quality profile to be assigned scores. Scores for other custom formats, including those I manually assign, should be reset back to zero."

radarr:
main:
base_url: !secret radarr_url
api_key: !secret radarr_apikey

quality_profiles:
- name: HD
reset_unmatched_scores: true

custom_formats:
- trash_ids:
# - a570d4a0e56a2874b64e5bfa55202a1b # FLAC (commented out so disabled)
- 2f22d89048b01681dde8afe203bf2e95 # DTS X
- 3cafb66171b47f226146a0770576870f # TrueHD
assign_scores_to:
- name: HD
- name: Ultra-HD

Let's say you have three custom formats added to Radarr: "FLAC", "DTS X", and "TrueHD". Since only two are listed in the trash_ids array ("FLAC" is commented out, so it is disabled), what happens to "FLAC"? Since two quality profiles are specified above, each with a different setting for reset_unmatched_scores, the behavior will be different:

  • The HD quality profile will always have the score for "FLAC" set to zero (0).
  • The Ultra-HD quality profile's score for "FLAC" will never be altered.

The reset_unmatched_scores setting basically determines how scores are handled for custom formats that exist in Radarr but are not in the list of trash_ids in config. As shown in the example above, you set it to true which results in unmatched scores being set to 0, or you can set it to false (or leave it omitted) in which case Recyclarr will not alter the value.

Which one should you use? That depends on how much control you want Recyclarr to have. If you use Recyclarr to supplement manual changes to your profiles, you probably want it set to false so it doesn't clobber your manual edits. Otherwise, set it to true so that scores aren't left over when you add/remove custom formats from a profile.

What does the file structure look like with multiple YAML configuration files?

Suppose you want to use recyclarr.yml and multiple YAML files in the configs directory, as documented on the File Structure page. What would that file structure look like?

Using docker as an example, it would look like this:

.
└── config/
├── cache/
├── repo/
├── configs/
│ ├── radarr.yml
│ └── sonarr.yml
├── includes/
│ ├── radarr_include.yml
│ └── sonarr_include.yml
└── recyclarr.yml

In the above example:

  • Recyclarr will load the recyclarr.yml file in config/, as well as both YAML files in configs/.
  • Each YAML file may contain any number of Radarr and/or Sonarr instances.
  • The names of the YAML files under configs/ can be whatever you want.
  • The YAML files under includes/ are not loaded, but can be referenced.

Merge multiple config templates into a single file with a single instance

Use case: You have multiple template files, created from recyclarr config create --template. You want all of those files to be merged into a single YAML file (e.g. recyclarr.yml). Instead of multiple instances, you want all configuration to be for a single (the same) instance.

info

Examples below are for Radarr, but the process is the same for Sonarr as well.

Let's say you start with two files.

remux-web-1080p.yml:

radarr:
radarr_hd:
base_url: !secret radarr_hd_url
api_key: !secret radarr_hd_apikey

quality_definition:
type: movie

quality_profiles:
- name: Remux + WEB 1080p
reset_unmatched_scores: true

custom_formats:
- trash_ids:
- 0f12c086e289cf966fa5948eac571f44 # Hybrid
- 570bc9ebecd92723d2d21500f4be314c # Remaster
assign_scores_to:
- name: Remux + WEB 1080p

uhd-bluray-web.yml:

radarr:
radarr_uhd:
base_url: !secret radarr_uhd_url
api_key: !secret radarr_uhd_apikey

quality_definition:
type: movie

quality_profiles:
- name: UHD Bluray + WEB
reset_unmatched_scores: true

custom_formats:
- trash_ids:
- e23edd2482476e595fb990b12e7c609c # DV HDR10
- 58d6a88f13e2db7f5059c41047876f00 # DV
assign_scores_to:
- name: UHD Bluray + WEB

Merging these files is a little bit involved. You can't just move whole blocks of YAML into another file. The sections directly under the instance name (e.g. uhd-bluray-web) need to be merged together without duplicating them. For example, don't introduce a second quality_profiles: block. Combine the contents to form a single section. Also note that some sections, like quality_definition, cannot be merged. If the two files use a different quality definition, you must choose one or the other.

The final merged file would look like below.

radarr:
radarr_merged:
base_url: !secret radarr_merged_url
api_key: !secret radarr_merged_apikey

quality_definition:
type: movie

quality_profiles:
- name: UHD Bluray + WEB
reset_unmatched_scores: true
- name: Remux + WEB 1080p
reset_unmatched_scores: true

custom_formats:
- trash_ids:
- e23edd2482476e595fb990b12e7c609c # DV HDR10
- 58d6a88f13e2db7f5059c41047876f00 # DV
assign_scores_to:
- name: UHD Bluray + WEB

- trash_ids:
- 0f12c086e289cf966fa5948eac571f44 # Hybrid
- 570bc9ebecd92723d2d21500f4be314c # Remaster
assign_scores_to:
- name: Remux + WEB 1080p

What was done:

  • quality_definition (in this case) both happened to use movie, so we simply left this one alone.
  • quality_profiles was combined. We added the element from the first file into the existing sequence.
  • custom_formats was combined similar to quality_profiles.