chore(schema): Allow custom formats in Sonarr config

pull/124/head
Robert Dailey 2 years ago
parent cafa181424
commit 21aba3b2aa

@ -28,14 +28,24 @@
"quality_definition": {
"type": "string"
},
"delete_old_custom_formats": {
"$ref": "#/$defs/delete_old_custom_formats"
},
"custom_formats": {
"$ref": "#/$defs/custom_formats"
},
"release_profiles": {
"type": "array",
"minItems": 1,
"items": {
"additionalProperties": false,
"anyOf": [
{"required": ["trash_ids"]},
{"required": ["names"]}
{
"required": ["trash_ids"]
},
{
"required": ["names"]
}
],
"properties": {
"trash_ids": {
@ -58,8 +68,12 @@
"additionalProperties": false,
"description": "Defines various ways that release profile terms from the guide are synchronized with Sonarr.",
"oneOf": [
{"required": ["include"]},
{"required": ["exclude"]}
{
"required": ["include"]
},
{
"required": ["exclude"]
}
],
"properties": {
"include": {
@ -116,58 +130,10 @@
}
},
"delete_old_custom_formats": {
"type": "boolean",
"description": "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.",
"default": false
"$ref": "#/$defs/delete_old_custom_formats"
},
"custom_formats": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"description": "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.",
"anyOf": [
{"required": ["trash_ids"]},
{"required": ["names"]}
],
"properties": {
"names": {
"type": "array",
"uniqueItems": true,
"description": "A list of one or more custom format names to synchronize to Radarr. The names must be taken from the JSON itself in the guide.",
"minItems": 1,
"items": {
"type": "string"
}
},
"trash_ids": {
"$ref": "#/$defs/trash_ids_list"
},
"quality_profiles": {
"type": "array",
"description": "One or more quality profiles to update with the scores from the specified custom formats.",
"minItems": 1,
"items": {
"properties": {
"name": {
"type": "string",
"description": "The name of one of the quality profiles in Radarr."
},
"score": {
"type": "integer",
"description": "A positive or negative number representing the score to apply to *all* custom formats listed in the names list."
},
"reset_unmatched_scores": {
"type": "boolean",
"description": "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).",
"default": false
}
}
}
}
}
}
"$ref": "#/$defs/custom_formats"
}
}
}
@ -192,6 +158,64 @@
"type": "string",
"pattern": "^https?",
"description": "The base URL of your instance. Basically this is the URL you bookmark to get to the front page."
},
"delete_old_custom_formats": {
"type": "boolean",
"description": "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.",
"default": false
},
"custom_formats": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"description": "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.",
"anyOf": [
{
"required": ["trash_ids"]
},
{
"required": ["names"]
}
],
"properties": {
"names": {
"type": "array",
"uniqueItems": true,
"description": "A list of one or more custom format names to synchronize to Radarr. The names must be taken from the JSON itself in the guide.",
"minItems": 1,
"items": {
"type": "string"
}
},
"trash_ids": {
"$ref": "#/$defs/trash_ids_list"
},
"quality_profiles": {
"type": "array",
"description": "One or more quality profiles to update with the scores from the specified custom formats.",
"minItems": 1,
"items": {
"properties": {
"name": {
"type": "string",
"description": "The name of one of the quality profiles in Radarr."
},
"score": {
"type": "integer",
"description": "A positive or negative number representing the score to apply to *all* custom formats listed in the names list."
},
"reset_unmatched_scores": {
"type": "boolean",
"description": "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).",
"default": false
}
}
}
}
}
}
}
}
}

Loading…
Cancel
Save