Jackett/src/Jackett.Common/Definitions/schema.json

1017 lines
33 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "#/definitions/SchemaRoot",
"definitions": {
"SchemaRoot": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"language": {
"type": "string",
"enum": ["af", "af-ZA", "ar", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SY", "ar-TN", "ar-YE", "az", "az-AZ", "be", "be-BY", "bg", "bg-BG", "bs-BA", "ca", "ca-ES", "cs", "cs-CZ", "cy", "cy-GB", "da", "da-DK", "de", "de-AT", "de-CH", "de-DE", "de-LI", "de-LU", "dv", "dv-MV", "el", "el-GR", "en", "en-AU", "en-BZ", "en-CA", "en-CB", "en-GB", "en-IE", "en-JM", "en-NZ", "en-PH", "en-TT", "en-US", "en-ZA", "en-ZW", "eo", "es", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV", "es-UY", "es-VE", "et", "et-EE", "eu", "eu-ES", "fa", "fa-IR", "fi", "fi-FI", "fo", "fo-FO", "fr", "fr-BE", "fr-CA", "fr-CH", "fr-FR", "fr-LU", "fr-MC", "gl", "gl-ES", "gu", "gu-IN", "he", "he-IL", "hi", "hi-IN", "hr", "hr-BA", "hr-HR", "hu", "hu-HU", "hy", "hy-AM", "id", "id-ID", "is", "is-IS", "it", "it-CH", "it-IT", "ja", "ja-JP", "ka", "ka-GE", "kk", "kk-KZ", "kn", "kn-IN", "ko", "ko-KR", "kok", "kok-IN", "ky", "ky-KG", "lt", "lt-LT", "lv", "lv-LV", "mi", "mi-NZ", "mk", "mk-MK", "mn", "mn-MN", "mr", "mr-IN", "ms", "ms-BN", "ms-MY", "mt", "mt-MT", "nb", "nb-NO", "nl", "nl-BE", "nl-NL", "nn-NO", "ns", "ns-ZA", "pa", "pa-IN", "pl", "pl-PL", "ps", "ps-AR", "pt", "pt-BR", "pt-PT", "qu", "qu-BO", "qu-EC", "qu-PE", "ro", "ro-RO", "ru", "ru-RU", "sa", "sa-IN", "se", "se-FI", "se-NO", "se-SE", "sk", "sk-SK", "sl", "sl-SI", "sq", "sq-AL", "sr-BA", "sr-SP", "sv", "sv-FI", "sv-SE", "sw", "sw-KE", "syr", "syr-SY", "ta", "ta-IN", "te", "te-IN", "th", "th-TH", "tl", "tl-PH", "tn", "tn-ZA", "tr", "tr-TR", "tt", "tt-RU", "ts", "uk", "uk-UA", "ur", "ur-PK", "uz", "uz-UZ", "vi", "vi-VN", "xh", "xh-ZA", "zh", "zh-CN", "zh-HK", "zh-MO", "zh-SG", "zh-TW", "zu", "zu-ZA"]
},
"type": {
"type": "string",
"enum": ["public", "semi-private", "private"]
},
"encoding": {
"type": "string"
},
"followredirect": {
"type": "boolean"
},
"testlinktorrent": {
"type": "boolean"
},
"requestDelay": {
"type": "number"
},
"links": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "uri"
}
},
"legacylinks": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"format": "uri"
}
},
"certificates": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"caps": {
"$ref": "#/definitions/Caps"
},
"settings": {
"type": "array",
"items": {
"$ref": "#/definitions/SettingsField"
}
},
"login": {
"$ref": "#/definitions/Login"
},
"search": {
"$ref": "#/definitions/Search"
},
"download": {
"$ref": "#/definitions/DownloadBlock"
}
},
"required": [
"caps",
"description",
"encoding",
"id",
"language",
"links",
"name",
"search",
"type"
],
"title": "SchemaRoot"
},
"Caps": {
"type": "object",
"additionalProperties": false,
"properties": {
"categories": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.*$": {
"$ref": "#/definitions/IndexerCategories"
}
}
},
"categorymappings": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/CategoryMapping"
}
},
"modes": {
"$ref": "#/definitions/Modes"
},
"allowrawsearch": {
"type": "boolean"
}
},
"required": [
"modes"
],
"oneOf": [
{
"required": [
"categories"
]
},
{
"required": [
"categorymappings"
]
}
],
"title": "Caps"
},
"CategoryMapping": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"oneOf": [
{"type": "integer"},
{"type": "string"}
]
},
"cat": {
"$ref": "#/definitions/IndexerCategories"
},
"desc": {
"type": "string"
},
"default": {
"type": "boolean"
}
},
"required": [
"cat",
"id"
],
"title": "CategoryMapping"
},
"Modes": {
"type": "object",
"additionalProperties": false,
"properties": {
"search": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["q"]
}
},
"tv-search": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["q", "season", "ep", "imdbid", "tvdbid", "tmdbid", "tvmazeid", "traktid", "doubanid", "year", "genre"]
}
},
"movie-search": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["q", "imdbid", "tmdbid", "traktid", "doubanid", "year", "genre"]
}
},
"music-search": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["q", "album", "artist", "label", "track", "year", "genre"]
}
},
"book-search": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["q", "title", "author", "publisher", "year", "genre"]
}
}
},
"required": [
"search"
],
"title": "Modes"
},
"SettingsField": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type":{
"type": "string",
"enum": ["info", "text", "password", "checkbox", "select"]
},
"default": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
}
]
},
"options": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.*$": {
"type": "string"
}
}
},
"defaults": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"label",
"name",
"type"
],
"title": "SettingsField"
},
"Login": {
"type": "object",
"additionalProperties": false,
"properties": {
"method": {
"type": "string",
"enum": ["form", "post", "cookie", "get", "oneurl"]
},
"cookies": {
"type": "array",
"items": {
"type": "string"
}
},
"path": {
"type": "string"
},
"submitpath": {
"type": "string"
},
"form": {
"type": "string"
},
"captcha": {
"$ref": "#/definitions/CaptchaBlock"
},
"inputs": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.*$": {
"oneOf": [
{"type": "number"},
{"type": "string"},
{"type": "boolean"}
]
}
}
},
"selectors": {
"type": "boolean"
},
"selectorinputs": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9_]*$": {
"$ref": "#/definitions/SelectorBlock"
}
}
},
"getselectorinputs": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9_]*$": {
"$ref": "#/definitions/SelectorBlock"
}
}
},
"error": {
"type": "array",
"items": {
"$ref": "#/definitions/ErrorBlock"
}
},
"test": {
"$ref": "#/definitions/PageTestBlock"
},
"headers": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9-]*$": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"title": "Login"
},
"PageTestBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
},
"selector": {
"type": "string"
}
},
"required": [
"path",
"selector"
],
"title": "PageTestBlock"
},
"CaptchaBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": ["image", "text"]
},
"selector": {
"type": "string"
},
"input": {
"type": "string"
}
},
"required": [
"input",
"selector",
"type"
],
"title": "CaptchaBlock"
},
"ErrorBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
},
"selector": {
"type": "string"
},
"message": {
"$ref": "#/definitions/SelectorBlock"
}
},
"required": [
"selector"
],
"title": "ErrorBlock"
},
"SelectorBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"selector": {
"type": "string"
},
"attribute": {
"type": "string"
},
"optional": {
"type": "boolean"
},
"default": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"case": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.*$": {
"oneOf": [
{"type": "string"},
{"type": "number"}
]
}
}
},
"remove": {
"type": "string"
},
"text": {
"oneOf": [
{"type": "string"},
{"type": "number"}
]
},
"filters": {
"type": "array",
"items": {
"$ref": "#/definitions/FilterBlock"
}
}
},
"dependentRequired": {
"default": [
"optional"
]
},
"allOf": [
{
"if": {
"properties": {
"default": {
"not": {
"const": null
}
}
}
},
"then": {
"properties": {
"optional": {
"const": true
}
}
}
}
],
"title": "SelectorBlock"
},
"Search": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
},
"paths": {
"type": "array",
"items": {
"$ref": "#/definitions/SearchPathBlock"
}
},
"allowEmptyInputs": {
"type": "boolean"
},
"inputs": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^((\\$raw)|[A-Za-z0-9.\\-_[\\]]*)$": {
"oneOf": [
{"type": "number"},
{"type": "string"},
{"type": "boolean"}
]
}
}
},
"headers": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9-]*$": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"keywordsfilters": {
"type": "array",
"items": {
"$ref": "#/definitions/FilterBlock"
}
},
"error": {
"type": "array",
"items": {
"$ref": "#/definitions/ErrorBlock"
}
},
"preprocessingfilters": {
"type": "array",
"items": {
"$ref": "#/definitions/FilterBlock"
}
},
"rows": {
"$ref": "#/definitions/RowsBlock"
},
"fields": {
"$ref": "#/definitions/FieldsBlock"
}
},
"required": [
"fields",
"rows"
],
"oneOf": [
{
"required": [
"paths"
]
},
{
"required": [
"path"
]
}
],
"title": "Search"
},
"SearchPathBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
},
"method": {
"type": "string"
},
"followredirect": {
"type": "boolean"
},
"categories": {
"type": "array",
"items": {
"oneOf": [
{"type": "integer"},
{"type": "string"}
]
}
},
"inputs": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^((\\$raw)|[A-Za-z0-9.\\-_[\\]]*)$": {
"oneOf": [
{"type": "integer"},
{"type": "string"}
]
}
}
},
"inheritinputs": {
"type": "boolean"
},
"queryseparator": {
"type": "string"
},
"response": {
"$ref": "#/definitions/ResponseBlock"
}
},
"required": [
"path"
],
"title": "SearchPathBlock"
},
"ResponseBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": ["json", "xml"]
},
"noResultsMessage": {
"type": "string"
}
},
"required": [
"type"
],
"title": "ResponseBlock"
},
"RowsBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"after": {
"type": "integer"
},
"dateheaders": {
"$ref": "#/definitions/SelectorBlock"
},
"selector": {
"type": "string"
},
"attribute": {
"type": "string"
},
"optional": {
"type": "boolean"
},
"multiple": {
"type": "boolean"
},
"missingAttributeEqualsNoResults": {
"type": "boolean"
},
"case": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9]*$": {
"type": "string"
}
}
},
"remove": {
"type": "string"
},
"text": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"filters": {
"type": "array",
"items": {
"$ref": "#/definitions/RowFilterBlock"
}
},
"count": {
"$ref": "#/definitions/SelectorBlock"
}
},
"title": "RowsBlock"
},
"FieldsBlock": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^_[A-Za-z0-9-_]*$": {
"$ref": "#/definitions/SelectorBlock"
},
"^((title|description)\\|(append))?$": {
"$ref": "#/definitions/SelectorBlock"
},
"^((category|categorydesc)\\|(noappend|append))?$": {
"$ref": "#/definitions/SelectorBlock"
},
"^(download|magnet|infohash|details|comments|title|description|category|categorydesc|size|leechers|seeders|date|files|grabs|downloadvolumefactor|uploadvolumefactor|minimumratio|minimumseedtime|imdb|imdbid|tmdbid|rageid|tvdbid|tvmazeid|traktid|doubanid|poster|genre|year|author|booktitle|publisher|album|artist|label|track)(_([A-Za-z0-9_])*)?$": {
"$ref": "#/definitions/SelectorBlock"
}
},
"required": [
"seeders",
"size",
"title"
],
"oneOf": [
{
"required": [
"category"
]
},
{
"required": [
"categorydesc"
]
}
],
"anyOf": [
{
"required": [
"download"
]
},
{
"required": [
"infohash"
]
},
{
"required": [
"magnet"
]
}
],
"title": "FieldsBlock"
},
"DownloadBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"method": {
"type": "string"
},
"before": {
"$ref": "#/definitions/BeforeBlock"
},
"selectors": {
"type": "array"
},
"infohash": {
"$ref": "#/definitions/InfoHashBlock"
},
"headers": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9-]*$": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"title": "DownloadBlock"
},
"BeforeBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
},
"pathselector": {
"$ref": "#/definitions/SelectorField"
},
"method": {
"type": "string"
},
"inputs": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9_]*$": {
"oneOf": [
{"type": "integer"},
{"type": "string"}
]
}
}
},
"queryseparator": {
"type": "string"
}
},
"oneOf": [
{
"required": [
"path"
]
},
{
"required": [
"pathselector"
]
}
],
"title": "BeforeBlock"
},
"InfoHashBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"hash": {
"$ref": "#/definitions/SelectorField"
},
"title": {
"$ref": "#/definitions/SelectorField"
},
"usebeforeresponse": {
"type": "boolean"
}
},
"title": "InfoHashBlock"
},
"SelectorField": {
"type": "object",
"additionalProperties": false,
"properties": {
"selector": {
"type": "string"
},
"attribute": {
"type": "string"
},
"usebeforeresponse": {
"type": "boolean"
},
"filters": {
"type": "array",
"items": {
"$ref": "#/definitions/FilterBlock"
}
}
},
"title": "SelectorField"
},
"RowFilterBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"enum": ["andmatch", "strdump"]
},
"args": {
"oneOf": [
{
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{"type": "number"},
{"type": "boolean"}
]
}
},
{"type": "string"},
{"type": "integer"}
]
}
},
"required": [
"name"
],
"title": "RowFilterBlock"
},
"FilterBlock": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"enum": ["querystring", "timeparse", "dateparse", "regexp", "re_replace", "split", "replace", "trim", "prepend", "append", "tolower", "toupper", "urldecode", "urlencode", "htmldecode", "htmlencode", "timeago", "reltime", "fuzzytime", "validfilename", "diacritics", "jsonjoinarray", "hexdump", "strdump", "validate"]
},
"args": {
"oneOf": [
{
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{"type": "number"},
{"type": "boolean"}
]
}
},
{"type": "string"},
{"type": "integer"}
]
}
},
"required": [
"name"
],
"allOf": [
{
"if": {
"properties": {
"name": {
"const": "dateparse"
}
}
},
"then": {
"properties": {
"args": {
"type": "string",
"not": {
"pattern": "\\d"
}
}
}
}
}
],
"title": "FilterBlock"
},
"IndexerCategories": {
"type": "string",
"enum": [
"Console",
"Console/NDS",
"Console/PSP",
"Console/Wii",
"Console/XBox",
"Console/XBox 360",
"Console/Wiiware",
"Console/XBox 360 DLC",
"Console/PS3",
"Console/Other",
"Console/3DS",
"Console/PS Vita",
"Console/WiiU",
"Console/XBox One",
"Console/PS4",
"Movies",
"Movies/Foreign",
"Movies/Other",
"Movies/SD",
"Movies/HD",
"Movies/UHD",
"Movies/BluRay",
"Movies/3D",
"Movies/DVD",
"Movies/WEB-DL",
"Audio",
"Audio/MP3",
"Audio/Video",
"Audio/Audiobook",
"Audio/Lossless",
"Audio/Other",
"Audio/Foreign",
"PC",
"PC/0day",
"PC/ISO",
"PC/Mac",
"PC/Mobile-Other",
"PC/Games",
"PC/Mobile-iOS",
"PC/Mobile-Android",
"TV",
"TV/WEB-DL",
"TV/Foreign",
"TV/SD",
"TV/HD",
"TV/UHD",
"TV/Other",
"TV/Sport",
"TV/Anime",
"TV/Documentary",
"XXX",
"XXX/DVD",
"XXX/WMV",
"XXX/XviD",
"XXX/x264",
"XXX/UHD",
"XXX/Pack",
"XXX/ImageSet",
"XXX/Other",
"XXX/SD",
"XXX/WEB-DL",
"Books",
"Books/Mags",
"Books/EBook",
"Books/Comics",
"Books/Technical",
"Books/Other",
"Books/Foreign",
"Other",
"Other/Misc",
"Other/Hashed"
],
"title": "IndexerCategories"
}
}
}