-
-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathstructures.py
More file actions
536 lines (497 loc) · 14.2 KB
/
Copy pathstructures.py
File metadata and controls
536 lines (497 loc) · 14.2 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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
from sys import version_info
from typing import NamedTuple
from logging import getLogger
logger = getLogger('temp')
# Check for python3.6 or newer to resolve erroneous typing.NamedTuple issues
if version_info < (3, 6, 2):
logger.error('Varken requires python3.6.2 or newer. You are on python%s.%s.%s - Exiting...',
version_info.major, version_info.minor, version_info.micro)
exit(1)
# Server Structures
class InfluxServer(NamedTuple):
password: str = 'root'
port: int = 8086
ssl: bool = False
url: str = 'localhost'
username: str = 'root'
verify_ssl: bool = False
class Influx2Server(NamedTuple):
url: str = 'localhost'
org: str = 'server'
token: str = 'TOKEN'
bucket: str = 'varken'
timeout: int = 10000
ssl: bool = False
verify_ssl: bool = False
class SonarrServer(NamedTuple):
api_key: str = None
future_days: int = 0
future_days_run_seconds: int = 30
id: int = None
missing_days: int = 0
missing_days_run_seconds: int = 30
queue: bool = False
queue_run_seconds: int = 30
url: str = None
verify_ssl: bool = False
class RadarrServer(NamedTuple):
api_key: str = None
get_missing: bool = False
get_missing_run_seconds: int = 30
id: int = None
queue: bool = False
queue_run_seconds: int = 30
url: str = None
verify_ssl: bool = False
class OmbiServer(NamedTuple):
api_key: str = None
id: int = None
issue_status_counts: bool = False
issue_status_run_seconds: int = 30
request_total_counts: bool = False
request_total_run_seconds: int = 30
request_type_counts: bool = False
request_type_run_seconds: int = 30
url: str = None
verify_ssl: bool = False
class TautulliServer(NamedTuple):
api_key: str = None
fallback_ip: str = None
get_activity: bool = False
get_activity_run_seconds: int = 30
get_stats: bool = False
get_stats_run_seconds: int = 30
id: int = None
url: str = None
verify_ssl: bool = None
maxmind_license_key: str = None
class SickChillServer(NamedTuple):
api_key: str = None
get_missing: bool = False
get_missing_run_seconds: int = 30
id: int = None
url: str = None
verify_ssl: bool = False
class UniFiServer(NamedTuple):
get_usg_stats_run_seconds: int = 30
id: int = None
password: str = 'ubnt'
site: str = None
url: str = 'unifi.domain.tld:8443'
username: str = 'ubnt'
usg_name: str = None
verify_ssl: bool = False
# Shared
class Queue(NamedTuple):
downloadId: str = None
episode: dict = None
estimatedCompletionTime: str = None
id: int = None
movie: dict = None
protocol: str = None
quality: dict = None
series: dict = None
size: float = None
sizeleft: float = None
status: str = None
statusMessages: list = None
timeleft: str = None
title: str = None
trackedDownloadStatus: str = None
# Ombi Structures
class OmbiRequestCounts(NamedTuple):
approved: int = 0
available: int = 0
pending: int = 0
class OmbiIssuesCounts(NamedTuple):
inProgress: int = 0
pending: int = 0
resolved: int = 0
class OmbiTVRequest(NamedTuple):
background: str = None
childRequests: list = None
denied: bool = None
deniedReason: None = None
id: int = None
imdbId: str = None
markedAsDenied: str = None
overview: str = None
posterPath: str = None
qualityOverride: None = None
releaseDate: str = None
rootFolder: None = None
status: str = None
title: str = None
totalSeasons: int = None
tvDbId: int = None
requestedByAlias: str = None
requestStatus: str = None
class OmbiMovieRequest(NamedTuple):
approved: bool = None
available: bool = None
background: str = None
canApprove: bool = None
denied: bool = None
deniedReason: None = None
digitalRelease: bool = None
digitalReleaseDate: None = None
id: int = None
imdbId: str = None
issueId: None = None
issues: None = None
markedAsApproved: str = None
markedAsAvailable: None = None
markedAsDenied: str = None
overview: str = None
posterPath: str = None
qualityOverride: int = None
released: bool = None
releaseDate: str = None
requestedDate: str = None
requestedUser: dict = None
requestedUserId: str = None
requestType: int = None
rootPathOverride: int = None
showSubscribe: bool = None
status: str = None
subscribed: bool = None
theMovieDbId: int = None
title: str = None
langCode: str = None
languageCode: str = None
requestedByAlias: str = None
requestStatus: str = None
# Sonarr
class SonarrTVShow(NamedTuple):
absoluteEpisodeNumber: int = None
airDate: str = None
airDateUtc: str = None
episodeFile: dict = None
episodeFileId: int = None
episodeNumber: int = None
hasFile: bool = None
id: int = None
lastSearchTime: str = None
monitored: bool = None
overview: str = None
sceneAbsoluteEpisodeNumber: int = None
sceneEpisodeNumber: int = None
sceneSeasonNumber: int = None
seasonNumber: int = None
series: dict = None
seriesId: int = None
title: str = None
unverifiedSceneNumbering: bool = None
# Radarr
class RadarrMovie(NamedTuple):
added: str = None
addOptions: str = None
alternativeTitles: list = None
certification: str = None
cleanTitle: str = None
downloaded: bool = None
folderName: str = None
genres: list = None
hasFile: bool = None
id: int = None
images: list = None
imdbId: str = None
inCinemas: str = None
isAvailable: bool = None
lastInfoSync: str = None
minimumAvailability: str = None
monitored: bool = None
movieFile: dict = None
overview: str = None
path: str = None
pathState: str = None
physicalRelease: str = None
physicalReleaseNote: str = None
profileId: int = None
qualityProfileId: int = None
ratings: dict = None
runtime: int = None
secondaryYear: str = None
secondaryYearSourceId: int = None
sizeOnDisk: int = None
sortTitle: str = None
status: str = None
studio: str = None
tags: list = None
title: str = None
titleSlug: str = None
tmdbId: int = None
website: str = None
year: int = None
youTubeTrailerId: str = None
# Sickchill
class SickChillTVShow(NamedTuple):
airdate: str = None
airs: str = None
episode: int = None
ep_name: str = None
ep_plot: str = None
indexerid: int = None
network: str = None
paused: int = None
quality: str = None
season: int = None
show_name: str = None
show_status: str = None
tvdbid: int = None
weekday: int = None
# Tautulli
class TautulliStream(NamedTuple):
actors: list = None
added_at: str = None
allow_guest: int = None
art: str = None
aspect_ratio: str = None
audience_rating: str = None
audience_rating_image: str = None
audio_bitrate: str = None
audio_bitrate_mode: str = None
audio_channel_layout: str = None
audio_channels: str = None
audio_codec: str = None
audio_decision: str = None
audio_language: str = None
audio_language_code: str = None
audio_profile: str = None
audio_sample_rate: str = None
bandwidth: str = None
banner: str = None
bif_thumb: str = None
bitrate: str = None
channel_icon: str = None
channel_stream: int = None
channel_title: str = None
children_count: str = None
collections: list = None
container: str = None
content_rating: str = None
current_session: str = None
date: str = None
deleted_user: int = None
device: str = None
directors: list = None
do_notify: int = None
duration: str = None
email: str = None
extra_type: str = None
file: str = None
file_size: str = None
friendly_name: str = None
full_title: str = None
genres: list = None
grandparent_guid: str = None
grandparent_rating_key: str = None
grandparent_thumb: str = None
grandparent_title: str = None
group_count: int = None
group_ids: str = None
guid: str = None
height: str = None
id: str = None
indexes: int = None
ip_address: str = None
ip_address_public: str = None
is_admin: int = None
is_allow_sync: int = None
is_home_user: int = None
is_restricted: int = None
keep_history: int = None
labels: list = None
last_viewed_at: str = None
library_name: str = None
live: int = None
live_uuid: str = None
local: str = None
location: str = None
machine_id: str = None
media_index: str = None
media_type: str = None
optimized_version: int = None
optimized_version_profile: str = None
optimized_version_title: str = None
original_title: str = None
originally_available_at: str = None
parent_guid: str = None
parent_media_index: str = None
parent_rating_key: str = None
parent_thumb: str = None
parent_title: str = None
paused_counter: int = None
percent_complete: int = None
platform: str = None
platform_name: str = None
platform_version: str = None
player: str = None
pre_tautulli: str = None
product: str = None
product_version: str = None
profile: str = None
progress_percent: str = None
quality_profile: str = None
rating: str = None
rating_image: str = None
rating_key: str = None
reference_id: int = None
relay: int = None
relayed: int = None
section_id: str = None
secure: str = None
selected: int = None
session_id: str = None
session_key: str = None
shared_libraries: list = None
sort_title: str = None
started: int = None
state: str = None
stopped: int = None
stream_aspect_ratio: str = None
stream_audio_bitrate: str = None
stream_audio_bitrate_mode: str = None
stream_audio_channel_layout: str = None
stream_audio_channel_layout_: str = None
stream_audio_channels: str = None
stream_audio_codec: str = None
stream_audio_decision: str = None
stream_audio_language: str = None
stream_audio_language_code: str = None
stream_audio_sample_rate: str = None
stream_bitrate: str = None
stream_container: str = None
stream_container_decision: str = None
stream_duration: str = None
stream_subtitle_codec: str = None
stream_subtitle_container: str = None
stream_subtitle_decision: str = None
stream_subtitle_forced: int = None
stream_subtitle_format: str = None
stream_subtitle_language: str = None
stream_subtitle_language_code: str = None
stream_subtitle_location: str = None
stream_video_bit_depth: str = None
stream_video_bitrate: str = None
stream_video_codec: str = None
stream_video_codec_level: str = None
stream_video_decision: str = None
stream_video_framerate: str = None
stream_video_full_resolution: str = None
stream_video_height: str = None
stream_video_language: str = None
stream_video_language_code: str = None
stream_video_ref_frames: str = None
stream_video_resolution: str = None
stream_video_scan_type: str = None
stream_video_width: str = None
studio: str = None
sub_type: str = None
subtitle_codec: str = None
subtitle_container: str = None
subtitle_decision: str = None
subtitle_forced: int = None
subtitle_format: str = None
subtitle_language: str = None
subtitle_language_code: str = None
subtitle_location: str = None
subtitles: int = None
summary: str = None
synced_version: int = None
synced_version_profile: str = None
tagline: str = None
throttled: str = None
thumb: str = None
title: str = None
transcode_audio_channels: str = None
transcode_audio_codec: str = None
transcode_container: str = None
transcode_decision: str = None
transcode_height: str = None
transcode_hw_decode: str = None
transcode_hw_decode_title: str = None
transcode_hw_decoding: int = None
transcode_hw_encode: str = None
transcode_hw_encode_title: str = None
transcode_hw_encoding: int = None
transcode_hw_full_pipeline: int = None
transcode_hw_requested: int = None
transcode_key: str = None
transcode_progress: int = None
transcode_protocol: str = None
transcode_speed: str = None
transcode_throttled: int = None
transcode_video_codec: str = None
transcode_width: str = None
type: str = None
updated_at: str = None
user: str = None
user_id: int = None
user_rating: str = None
user_thumb: str = None
username: str = None
video_bit_depth: str = None
video_bitrate: str = None
video_codec: str = None
video_codec_level: str = None
video_decision: str = None
video_frame_rate: str = None
video_framerate: str = None
video_full_resolution: str = None
video_height: str = None
video_language: str = None
video_language_code: str = None
video_profile: str = None
video_ref_frames: str = None
video_resolution: str = None
video_scan_type: str = None
video_width: str = None
view_offset: str = None
watched_status: int = None
width: str = None
writers: list = None
year: str = None
# Lidarr
class LidarrQueue(NamedTuple):
artistId: int = None
albumId: int = None
language: dict = None
quality: dict = None
size: float = None
title: str = None
timeleft: str = None
sizeleft: float = None
status: str = None
trackedDownloadStatus: str = None
statusMessages: list = None
downloadId: str = None
protocol: str = None
downloadClient: str = None
indexer: str = None
outputPath: str = None
downloadForced: bool = None
id: int = None
class LidarrAlbum(NamedTuple):
title: str = None
disambiguation: str = None
overview: str = None
artistId: int = None
foreignAlbumId: str = None
monitored: bool = None
anyReleaseOk: bool = None
profileId: int = None
duration: int = None
albumType: str = None
secondaryTypes: list = None
mediumCount: int = None
ratings: dict = None
releaseDate: str = None
releases: list = None
genres: list = None
media: list = None
artist: dict = None
images: list = None
links: list = None
statistics: dict = {}
id: int = None