-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig-schema.json
More file actions
332 lines (332 loc) · 9.55 KB
/
config-schema.json
File metadata and controls
332 lines (332 loc) · 9.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/fetcharr/fetcharr/main/config-schema.json",
"type": "object",
"additionalProperties": false,
"properties": {
"include": {
"$ref": "#/$defs/include_list"
},
"plex": {
"$ref": "#/$defs/plex"
},
"sonarr": {
"type": "object",
"patternProperties": {
"^.*$": {
"$ref": "#/$defs/sonarr_service_instance"
}
}
},
"radarr": {
"type": "object",
"patternProperties": {
"^.*$": {
"$ref": "#/$defs/radarr_service_instance"
}
}
}
},
"$defs": {
"include_file": {
"type": "object",
"description": "Include a separate configuration file into the current one.",
"additionalProperties": false,
"anyOf": [
{
"required": [
"config"
]
}
],
"properties": {
"config": {
"type": "string",
"description": "Include a separate configuration file, relative to the current one.\nCan also be absolute."
}
}
},
"include_list": {
"type": "array",
"minItems": 1,
"description": "thingy dingy",
"additionalItems": false,
"items": {
"$ref": "#/$defs/include_file"
}
},
"enabled": {
"type": "boolean",
"default": true,
"description": "Whether the instance should be considered."
},
"base_url": {
"type": "string",
"description": "The base URL of the instance. Must include both protocol, hostname, port and path."
},
"api_key": {
"type": "string",
"description": "The API key for the instance."
},
"filters": {
"$ref": "#/$defs/service_filter_collection"
},
"root_folder": {
"type": [
"string",
"null"
],
"description": "Defines the path of the root folder to store items in. If not set, uses the first root folder from the instance."
},
"quality_profile": {
"type": [
"string",
"null"
],
"description": "Defines the name of the quality profile to add items as. If not set, uses the first quality profile from the instance."
},
"monitored": {
"type": "boolean",
"default": true,
"description": "Defines whether the item should be monitored."
},
"search_immediately": {
"type": "boolean",
"default": true,
"description": "Defines whether the instance to search for the item immediately after adding it."
},
"allow_in_production": {
"type": "boolean",
"default": false,
"description": "Whether to allow in-production series to be added to the instance.\nWhen in-production, genres and certifications are still not finalized; meaning filters likely won't work."
},
"update_existing": {
"type": "boolean",
"default": true,
"description": "Whether existing items in the service should be updated or left as-is."
},
"service_filter": {
"type": "array",
"uniqueItems": true,
"description": "Service filters limit what items can be sent to the specific instance.",
"items": {
"type": "string"
}
},
"service_genre_filter": {
"$ref": "#/$defs/service_filter",
"description": "Limits what item genres can be added to the instance. Can be used to limit an instance to anime-only content.",
"items": {
"type": "string"
},
"examples": [
"action",
"adventure",
"animation",
"anime",
"crime",
"drama",
"fantasy",
"food",
"history",
"horror",
"mystery",
"martial arts",
"romance",
"science fiction",
"sport",
"thriller",
"war",
"western"
]
},
"service_certification_filter": {
"$ref": "#/$defs/service_filter",
"description": "Limits what certifications can be added to the instance. Can be used to limit an instance to kids-only content.",
"items": {
"type": "string"
},
"examples": [
/* TV Parental Guidelines (US) */
"TV-Y", // All children, including ages from 2-6
"TV-Y7", // Directed at children age 7 and above.
"TV-G", // General audience
"TV-PG", // Parental guidance suggested
"TV-14", // Parents strongly cautioned; may be unsuitable for children under the age of 14
"TV-MA", // Mature audience only
/* MPA film rating systems (US) */
"G", // General audience; all ages admitted.
"PG", // Parental guidance suggested; some material may not be suitable for children.
"PG-13", // Parents strongly cautioned; some material may be inappropriate for children under 13.
"R", // Restricted; under 17 requires accompanying parent or adult guardian.
"NC-17" // Adults only; no one 17 and under admitted.
]
},
"service_filter_collection": {
"type": "object",
"additionalProperties": false,
"description": "Collection of service filters, which limit what items can be added to an instance.",
"properties": {
"genre": {
"$ref": "#/$defs/service_genre_filter"
},
"certification": {
"$ref": "#/$defs/service_certification_filter"
}
}
},
"plex": {
"type": "object",
"additionalProperties": false,
"required": [
"api_token"
],
"properties": {
"api_token": {
"type": "string",
"description": "API token for authenticating with Plex.\nSee more here: https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/"
},
"sync_friends_watchlist": {
"type": "boolean",
"default": false,
"description": "Whether to include friends' watchlists when syncing."
}
}
},
"sonarr_service_instance": {
"type": "object",
"required": [
"base_url",
"api_key"
],
"properties": {
"enabled": {
"$ref": "#/$defs/enabled"
},
"base_url": {
"$ref": "#/$defs/base_url"
},
"api_key": {
"$ref": "#/$defs/api_key"
},
"filters": {
"$ref": "#/$defs/service_filter_collection"
},
"root_folder": {
"$ref": "#/$defs/root_folder"
},
"quality_profile": {
"$ref": "#/$defs/quality_profile"
},
"monitored": {
"$ref": "#/$defs/monitored"
},
"search_immediately": {
"$ref": "#/$defs/search_immediately"
},
"allow_in_production": {
"$ref": "#/$defs/allow_in_production"
},
"series_type": {
"enum": [
"Standard",
"Daily",
"Anime"
],
"description": "Defines what type to assign to newly-added series."
},
"season_folder": {
"type": "boolean",
"default": true,
"description": "Defines whether to create season folders for newly-added series."
},
"monitor_new_items": {
"type": "boolean",
"default": false,
"description": "Defines whether to monitor new items, as they are released."
},
"monitored_items": {
"enum": [
"None",
"All",
"FirstSeason",
"OnlyShortSeries"
],
"default": "FirstSeason",
"description": "Defines which seasons should be monitored for newly-added series."
}
},
"if": {
"properties": {
"monitored_items": {
"const": "OnlyShortSeries"
}
}
},
"then": {
"properties": {
"short_series_threshold": {
"type": "number",
"default": 3,
"description": "When \"monitored_items\" is set to \"OnlyShortSeries\", defines the threshold for when a series is still 'short'. If a series has less-or-equal to this amount of seasons, it is considered short."
}
}
}
},
"radarr_service_instance": {
"type": "object",
"required": [
"base_url",
"api_key"
],
"properties": {
"enabled": {
"$ref": "#/$defs/enabled"
},
"base_url": {
"$ref": "#/$defs/base_url"
},
"api_key": {
"$ref": "#/$defs/api_key"
},
"filters": {
"$ref": "#/$defs/service_filter_collection"
},
"root_folder": {
"$ref": "#/$defs/root_folder"
},
"quality_profile": {
"$ref": "#/$defs/quality_profile"
},
"monitored": {
"$ref": "#/$defs/monitored"
},
"search_immediately": {
"$ref": "#/$defs/search_immediately"
},
"allow_in_production": {
"$ref": "#/$defs/allow_in_production"
},
"minimum_availability": {
"enum": [
"TBA",
"Announced",
"InCinemas",
"Released"
],
"default": "Released",
"description": "Sets the minimum availability before the instance should attempt fetching the movie."
},
"monitored_items": {
"enum": [
"None",
"MovieOnly",
"MovieAndCollection"
],
"default": "MovieOnly",
"description": "Defines which items should be monitored for newly-added movies."
}
}
}
}
}