diff --git a/README.md b/README.md index 5e92f635..8ed809ac 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ features list, see the [Features] page. **Sonarr**: -- Sync Release Profiles from the guide. +- Sync Release Profiles from the guide to Sonarr v3. +- Supports Sonarr v4 Custom Formats. - Sync Quality Definitions (sizes) from the guide. - Add Tags to Release Profiles. - Assign scores from the guide to quality profiles. @@ -37,7 +38,7 @@ Before installing & running Recyclarr, please review the requirements & special - Minimum Supported Sonarr Version: `3.0.4.1098` - Minimum Supported Radarr Version: `3.*` -- Sonarr v4 is **not supported yet**. +- Sonarr `4.0` or greater is required for custom format support. - Do not run Notifiarr's Trash Guides Integration in conjunction with Recyclarr's Custom Format synchronization. In general, you should not have two different tools updating the same data in Radarr or Sonarr. diff --git a/wiki/Configuration-Examples.md b/wiki/Configuration-Examples.md index c6cdc276..f7cf688a 100644 --- a/wiki/Configuration-Examples.md +++ b/wiki/Configuration-Examples.md @@ -1,12 +1,11 @@ Various scenarios supported using flexible configuration structure: - [Update as much as possible in both Sonarr and Radarr with a single config](#update-as-much-as-possible-in-both-sonarr-and-radarr-with-a-single-config) -- [Selectively update different parts of Sonarr](#selectively-update-different-parts-of-sonarr) -- [Update multiple Sonarr instances in a single YAML config](#update-multiple-sonarr-instances-in-a-single-yaml-config) +- [Selectively update different parts of Sonarr v3](#selectively-update-different-parts-of-sonarr-v3) +- [Update Sonarr v3 and v4 instances in a single YAML config](#update-sonarr-v3-and-v4-instances-in-a-single-yaml-config) - [Synchronize a lot of custom formats for a single quality profile](#synchronize-a-lot-of-custom-formats-for-a-single-quality-profile) - [Manually assign different scores to multiple custom formats](#manually-assign-different-scores-to-multiple-custom-formats) - [Assign custom format scores the same way to multiple quality profiles](#assign-custom-format-scores-the-same-way-to-multiple-quality-profiles) -- [Resolving ambiguity between custom formats with the same name](#resolving-ambiguity-between-custom-formats-with-the-same-name) - [Scores in a quality profile should be set to zero if it wasn't listed in config](#scores-in-a-quality-profile-should-be-set-to-zero-if-it-wasnt-listed-in-config) ## Update as much as possible in both Sonarr and Radarr with a single config @@ -46,7 +45,9 @@ recyclarr sonarr && recyclarr radarr This scenario is pretty ideal for a cron job you have running regularly and you want it to update everything possible in one go. -## Selectively update different parts of Sonarr +## Selectively update different parts of Sonarr v3 + +***NOTE:** The official Docker container does not support multiple configuration files* Say you want to update Sonarr release profiles from the guide, but not the quality definitions. There's no command line option to control this, so how do you do it? @@ -89,21 +90,25 @@ you run the program: recyclarr sonarr --config sonarr-release-profiles.yml sonarr-quality-definition.yml ``` -## Update multiple Sonarr instances in a single YAML config +## Update Sonarr v3 and v4 instances in a single YAML config -If you have two instances of Sonarr that you'd like to update from a single run of the updater using -one YAML file, you can do that by simply specifying both in the list under the `sonarr` property: +If you have two instances of Sonarr, one v3 and one v4, that you'd like to update from a single run +using one YAML file, you can do that by simply specifying both in the list under the `sonarr` +property: ```yml sonarr: - - base_url: http://instance_one:8989 + - base_url: http://sonarr_v4:8989 api_key: f7e74ba6c80046e39e076a27af5a8444 quality_definition: anime - release_profiles: + custom_formats: - trash_ids: - - d428eda85af1df8904b4bbe4fc2f537c # Anime - First release profile - - 6cd9e10bb5bb4c63d2d7cd3279924c7b # Anime - Second release profile - - base_url: http://instance_two:8989 + - 949c16fe0a8147f50ba82cc2df9411c9 # Anime BD Tier 01 (Top SeaDex Muxers) + - ed7f1e315e000aef424a58517fa48727 # Anime BD Tier 02 (SeaDex Muxers) + - 096e406c92baa713da4a72d88030b815 # Anime BD Tier 03 (SeaDex Muxers) + quality_profiles: + - name: Anime Subs + - base_url: http://sonarr_v3:8989 api_key: bf99da49d0b0488ea34e4464aa63a0e5 quality_definition: series release_profiles: @@ -115,14 +120,13 @@ sonarr: In the example above, two separate instances, each with its own API key, will be updated. One instance is for Anime only. The other is for Series (TV) only. And since I'm using two instances, I -don't bother with tags, so I am able to leave those elements out. +don't bother with tags, so I am able to leave those elements out. Recyclarr knows when it's talking +to either a v3 or v4 instance of Sonarr and will correctly anticipate either `release_profiles` or +`custom_formats` (respectively). When you run `recyclarr sonarr` (specify `--config` if you aren't using the default `recyclarr.yml`) it will update both instances. -You can also split theses two instances across different YAML files if you do not want both to -update at the same time. There's an example of how to do that in a different section of this page. - ## 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 @@ -138,29 +142,29 @@ radarr: 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 + - 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 quality_profiles: - name: SD ``` ## Manually assign different scores to multiple custom formats -Scenario: *"I want to synchronize custom formats to Radarr. 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."* +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: @@ -172,22 +176,22 @@ radarr: custom_formats: # Take scores in the guide for these 3 - trash_ids: - - 3cafb66171b47f226146a0770576870f #TrueHD - - dcf3ec6938fa32445f590a4da84256cd #DTS-HD MA - - a570d4a0e56a2874b64e5bfa55202a1b #FLAC + - 3cafb66171b47f226146a0770576870f # TrueHD + - dcf3ec6938fa32445f590a4da84256cd # DTS-HD MA + - a570d4a0e56a2874b64e5bfa55202a1b # FLAC quality_profiles: - name: SD # Assign manual scores to the 3 below CFs, each added to the same profile - - trash_ids: [496f355514737f7d83bf7aa4d24f8169] #TrueHD ATMOS + - trash_ids: [496f355514737f7d83bf7aa4d24f8169] # TrueHD ATMOS quality_profiles: - name: SD score: 100 - - trash_ids: [2f22d89048b01681dde8afe203bf2e95] #DTS X + - trash_ids: [2f22d89048b01681dde8afe203bf2e95] # DTS X quality_profiles: - name: SD score: 200 - - trash_ids: [417804f7f2c4308c1f4c5d380d4c4475] #ATMOS (undefined) + - trash_ids: [417804f7f2c4308c1f4c5d380d4c4475] # ATMOS (undefined) quality_profiles: - name: SD score: 300 @@ -208,11 +212,11 @@ radarr: custom_formats: - trash_ids: - - 496f355514737f7d83bf7aa4d24f8169 #TrueHD ATMOS - - 2f22d89048b01681dde8afe203bf2e95 #DTS X - - 417804f7f2c4308c1f4c5d380d4c4475 #ATMOS (undefined) - - 1af239278386be2919e1bcee0bde047e #DD+ ATMOS - - 3cafb66171b47f226146a0770576870f #TrueHD + - 496f355514737f7d83bf7aa4d24f8169 # TrueHD ATMOS + - 2f22d89048b01681dde8afe203bf2e95 # DTS X + - 417804f7f2c4308c1f4c5d380d4c4475 # ATMOS (undefined) + - 1af239278386be2919e1bcee0bde047e # DD+ ATMOS + - 3cafb66171b47f226146a0770576870f # TrueHD quality_profiles: - name: SD - name: Ultra-HD @@ -230,11 +234,11 @@ radarr: custom_formats: - trash_ids: - - 496f355514737f7d83bf7aa4d24f8169 #TrueHD ATMOS - - 2f22d89048b01681dde8afe203bf2e95 #DTS X - - 417804f7f2c4308c1f4c5d380d4c4475 #ATMOS (undefined) - - 1af239278386be2919e1bcee0bde047e #DD+ ATMOS - - 3cafb66171b47f226146a0770576870f #TrueHD + - 496f355514737f7d83bf7aa4d24f8169 # TrueHD ATMOS + - 2f22d89048b01681dde8afe203bf2e95 # DTS X + - 417804f7f2c4308c1f4c5d380d4c4475 # ATMOS (undefined) + - 1af239278386be2919e1bcee0bde047e # DD+ ATMOS + - 3cafb66171b47f226146a0770576870f # TrueHD quality_profiles: - name: SD score: 100 # This score is assigned to all 5 CFs in this profile @@ -243,9 +247,9 @@ radarr: ## Scores in a quality profile should be set to zero if it wasn't listed in config -Scenario: *"I completely rely on Recyclarr to set scores on my quality profiles. I never plan to -manually set scores on those profiles. If I alter which custom format scores get assigned to a -quality profile, the old scores should be set back to 0 automatically for me."* +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."* ```yml radarr: @@ -254,25 +258,28 @@ radarr: custom_formats: - trash_ids: - - 2f22d89048b01681dde8afe203bf2e95 #DTS X - - 3cafb66171b47f226146a0770576870f #TrueHD + - 1c7d7b04b15cc53ea61204bebbcc1ee2 # HQ + + - trash_ids: + - 2f22d89048b01681dde8afe203bf2e95 # DTS X + - 3cafb66171b47f226146a0770576870f # TrueHD quality_profiles: - name: SD reset_unmatched_scores: true - name: Ultra-HD ``` -Let's say you have three custom formats added to Radarr: "DTS X", "TrueHD", and "DoVi". Since only -the first two are listed in the `trash_ids` array, what happens to "DoVi"? Since two quality profiles -are specified above, each with a different setting for `reset_unmatched_scores`, the behavior will -be different: +Let's say you have three custom formats added to Radarr: "DTS X", "TrueHD", and "HD". Since only the +first two are listed in the `trash_ids` array, what happens to "HD"? Since two quality profiles are +specified above, each with a different setting for `reset_unmatched_scores`, the behavior will be +different: -- The `SD` profile will always have the score for "DoVi" set to zero (`0`). -- The `Ultra-HD` profile's score for "DoVi" will never be altered. +- The `SD` quality profile will always have the score for "HD" set to zero (`0`). +- The `Ultra-HD` quality profile's score for "HD" 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 +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 diff --git a/wiki/Configuration-Reference.md b/wiki/Configuration-Reference.md index badf1406..c2247151 100644 --- a/wiki/Configuration-Reference.md +++ b/wiki/Configuration-Reference.md @@ -27,14 +27,96 @@ multiple ways, offering a lot of flexibility: Table of Contents -- [Sonarr](#sonarr) +- [All Services](#all-services) - [Basic Settings](#basic-settings) + - [Custom Format Settings](#custom-format-settings) +- [Sonarr](#sonarr) + - [Custom Format Settings](#custom-format-settings-1) - [Quality Definition Settings](#quality-definition-settings) - [Release Profile Settings](#release-profile-settings) - [Radarr](#radarr) - - [Basic Settings](#basic-settings-1) + - [Custom Format Settings](#custom-format-settings-2) - [Quality Definition Settings](#quality-definition-settings-1) - - [Custom Format Settings](#custom-format-settings) + +## All Services + +The below settings are applicable to both Sonarr and Radarr. + +### Basic Settings + +- `base_url` **(Required)**
+ The base URL of your instance. Basically this is the URL you bookmark to get to the front page. + +- `api_key` **(Required)**
+ The API key that Recyclarr should use to synchronize settings to your instance. You can obtain + your API key by going to `Settings > General` and copy & paste the "API Key" under the "Security" + group/header. + +### Custom Format Settings + +> ❗ **Notice** ❗
+> For Sonarr: version 4 or greater is **required** for Custom Format support to work. + +For details on the way Custom Formats are synchronized, visit the [[Custom Format Synchronization]] +page. + +- `delete_old_custom_formats` (Optional; *Default: `false`*)
+ If enabled, custom formats that you remove from your YAML configuration OR that are removed from + the guide will be deleted from your Radarr instance. Note that this *only* applies to custom + formats that Recyclarr has synchronized to Radarr. Custom formats that you have added manually in + Radarr **will not be deleted** if you enable this setting. + +- `custom_formats` (Optional; *Default: No custom formats are synced*)
+ A list of one or more sets of custom formats each with an optional set of quality profiles names + that identify which quality profiles to assign the scores for those custom formats to. The child + properties documented below apply to each element of this list. + + - `trash_ids` (Optional; *`names` is required if not used*)
+ A list of one or more Trash IDs of custom formats to synchronize to Radarr. The IDs *must* be + taken from the value of the `"trash_id"` property in the JSON itself. It will look like the + following: + + ```json + { + "trash_id": "496f355514737f7d83bf7aa4d24f8169", + } + ``` + + **TIP:** To ease the readability concerns of using IDs instead of names, leave a comment beside + the Trash ID in your configuration so it can be easily identified later. For example: + + ```yml + trash_ids: + - 5d96ce331b98e077abb8ceb60553aa16 # dovi + - a570d4a0e56a2874b64e5bfa55202a1b # flac + ``` + + > **A Few Things to Remember** + > + > - If `delete_old_custom_formats` is set to true, custom formats are **deleted** in Radarr if + > you remove them from this list. + > - It's OK for the same custom format to exist in multiple lists of `trash_ids`. Recyclarr will + > only ever synchronize it once. Allowing it to be specified multiple times allows you to + > assign it to different profiles with different scores. + + - `quality_profiles` (Optional; *Default: No quality profiles are changed*)
+ One or more quality profiles to update with the scores from the custom formats listed above. + Scores are taken from the guide by default, with an option to override the score for all of + them. Each object in the list must use the properties below. + + - `name` **(Required)**
+ The name of one of the quality profiles in Radarr. + + - `score` (Optional; *Default: Use scores from the guide*)
+ A positive or negative number representing the score to apply to *all* custom formats listed + in the `names` list. A score of `0` is also acceptable, which effectively disables the custom + formats without having to delete them. + + - `reset_unmatched_scores` (Optional; *Default: `false`*)
+ If set to `true`, enables setting scores to `0` in quality profiles where either a name was + not mentioned in the `names` array *or* it was in that list but did not get a score (e.g. no + score in guide). If `false`, scores are never altered unless it is listed in the `names` array + *and* has a valid score to assign. ## Sonarr @@ -67,16 +149,13 @@ sonarr: tags: [tv] ``` -### Basic Settings +### Custom Format Settings -- `base_url` **(Required)**
- The base URL of your Sonarr instance. Basically this is the URL you bookmark to get to the front - page. +> ❗ **Notice** ❗
+> Sonarr version 4 or greater is **required** for Custom Format support to work. -- `api_key` **(Required)**
- The API key that Recyclarr should use to synchronize settings to your instance. You can obtain - your API key by going to `Sonarr > Settings > General` and copy & paste the "API Key" under the - "Security" group/header. +See the [Custom Format Settings](#custom-format-settings) section under "All Services" at the top +for more information. ### Quality Definition Settings @@ -93,6 +172,9 @@ sonarr: ### Release Profile Settings +> 💀 **Deprecation Notice** 💀
+> Release Profiles are deprecated and may not be used in Sonarr version 4 or greater! + - `release_profiles` (Optional; *Default: No release profiles are synced*)
A list of release profiles to parse from the guide. Each object in this list supports the below properties. @@ -145,16 +227,16 @@ radarr: delete_old_custom_formats: false custom_formats: - trash_ids: - - ed38b889b31be83fda192888e2286d83 #BR-DISK - - 90cedc1fea7ea5d11298bebd3d1d3223 #EVO (no WEBDL) - - 90a6f9a284dff5103f6346090e6280c8 #LQ - - dc98083864ea246d05a42df0d05f81cc #x265 (720/1080p) - - b8cd450cbfa689c0259a01d9e29ba3d6 #3D - - ae9b7c9ebde1f3bd336a8cbd1ec4c5e5 #No-RlsGroup - - 7357cf5161efbf8c4d5d0c30b4815ee2 #Obfuscated - - 5c44f52a8714fdd79bb4d98e2673be1f #Retags - - b6832f586342ef70d9c128d40c07b872 #Bad Dual Groups - - 923b6abef9b17f937fab56cfcf89e1f1 #DV (WEBDL) + - ed38b889b31be83fda192888e2286d83 #BR-DISK + - 90cedc1fea7ea5d11298bebd3d1d3223 #EVO (no WEBDL) + - 90a6f9a284dff5103f6346090e6280c8 #LQ + - dc98083864ea246d05a42df0d05f81cc #x265 (720/1080p) + - b8cd450cbfa689c0259a01d9e29ba3d6 #3D + - ae9b7c9ebde1f3bd336a8cbd1ec4c5e5 #No-RlsGroup + - 7357cf5161efbf8c4d5d0c30b4815ee2 #Obfuscated + - 5c44f52a8714fdd79bb4d98e2673be1f #Retags + - b6832f586342ef70d9c128d40c07b872 #Bad Dual Groups + - 923b6abef9b17f937fab56cfcf89e1f1 #DV (WEBDL) quality_profiles: - name: HD-1080p - name: HD-720p2 @@ -166,16 +248,10 @@ radarr: - name: SD ``` -### Basic Settings - -- `base_url` **(Required)**
- The base URL of your Radarr instance. Basically this is the URL you bookmark to get to the front - page. +### Custom Format Settings -- `api_key` **(Required)**
- The API key that Recyclarr should use to synchronize settings to your instance. You can obtain - your API key by going to `Radarr > Settings > General` and copy & paste the "API Key" under the - "Security" group/header. +See the [Custom Format Settings](#custom-format-settings) section under "All Services" at the top +for more information. ### Quality Definition Settings @@ -195,66 +271,3 @@ radarr: Any value less than `0` or greater than `1` will result in a warning log printed and the value will be clamped. - -### Custom Format Settings - -For details on the way Custom Formats are synchronized to Radarr, visit the [[Custom Format -Synchronization]] page. - -- `delete_old_custom_formats` (Optional; *Default: `false`*)
- If enabled, custom formats that you remove from your YAML configuration OR that are removed from - the guide will be deleted from your Radarr instance. Note that this *only* applies to custom - formats that Recyclarr has synchronized to Radarr. Custom formats that you have added manually in - Radarr **will not be deleted** if you enable this setting. - -- `custom_formats` (Optional; *Default: No custom formats are synced*)
- A list of one or more sets of custom formats each with an optional set of quality profiles names - that identify which quality profiles to assign the scores for those custom formats to. The child - properties documented below apply to each element of this list. - - - `trash_ids` (Optional; *`names` is required if not used*)
- A list of one or more Trash IDs of custom formats to synchronize to Radarr. The IDs *must* be - taken from the value of the `"trash_id"` property in the JSON itself. It will look like the - following: - - ```json - { - "trash_id": "496f355514737f7d83bf7aa4d24f8169", - } - ``` - - **TIP:** To ease the readability concerns of using IDs instead of names, leave a comment beside - the Trash ID in your configuration so it can be easily identified later. For example: - - ```yml - trash_ids: - - 5d96ce331b98e077abb8ceb60553aa16 # dovi - - a570d4a0e56a2874b64e5bfa55202a1b # flac - ``` - - > **A Few Things to Remember** - > - > - If `delete_old_custom_formats` is set to true, custom formats are **deleted** in Radarr if - > you remove them from this list. - > - It's OK for the same custom format to exist in multiple lists of `trash_ids`. Recyclarr will - > only ever synchronize it once. Allowing it to be specified multiple times allows you to - > assign it to different profiles with different scores. - - - `quality_profiles` (Optional; *Default: No quality profiles are changed*)
- One or more quality profiles to update with the scores from the custom formats listed above. - Scores are taken from the guide by default, with an option to override the score for all of - them. Each object in the list must use the properties below. - - - `name` **(Required)**
- The name of one of the quality profiles in Radarr. - - - `score` (Optional; *Default: Use scores from the guide*)
- A positive or negative number representing the score to apply to *all* custom formats listed - in the `names` list. A score of `0` is also acceptable, which effectively disables the custom - formats without having to delete them. - - - `reset_unmatched_scores` (Optional; *Default: `false`*)
- If set to `true`, enables setting scores to `0` in quality profiles where either a name was - not mentioned in the `names` array *or* it was in that list but did not get a score (e.g. no - score in guide). If `false`, scores are never altered unless it is listed in the `names` array - *and* has a valid score to assign. diff --git a/wiki/Settings-Reference.md b/wiki/Settings-Reference.md index e384d4af..3e2d8cbd 100644 --- a/wiki/Settings-Reference.md +++ b/wiki/Settings-Reference.md @@ -78,3 +78,18 @@ repository: repository. If not specified, only the `branch` controls what revision is used in the repo. [official_repo]: https://github.com/TRaSH-/Guides + +## Log Janitor Settings + +The log janitor is responsible for cleaning up logs generated by Recyclarr each time a command is +executed. These settings allow the user to alter the default cleanup behavior. For example, you may +want logs to be cleaned up sooner or keep log files around longer. + +```yml +log_janitor: + max_files: 20 +``` + +- `max_files` *(Default: `20`)*
+ The maximum number of log files to keep. If there are more log files than the max allowed here, + Log Janitor will remove the oldest log files.