This repository was archived by the owner on Mar 2, 2021. It is now read-only.
forked from epikurus/flexget_config
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathconfig.yml
More file actions
876 lines (802 loc) · 23.9 KB
/
config.yml
File metadata and controls
876 lines (802 loc) · 23.9 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
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
variables: secrets.yml
schedules:
##### YOUR TORRENT CLIENT SHOULD RUN THIS COMMAND AFTER EVERY DOWNLOAD: PATH_TO_flexget/bin/flexget execute --tasks find-* move-*
##### Alternatively uncomment this task to process downloaded files every 30min.
# - tasks: [ 'find-*', 'move-*']
# interval:
# minutes: 30
##### Every day at 2AM, check nextep to search (necessary if you added a new show to the list but have already watched it partly) and find subtitles attempt #2 (without original name).
- tasks: ['*-nextep', get-subtitles]
schedule:
hour: 2
##### Twice a day between 2AM and 7AM: scan existing files, fill queue, check the feeds for latest episodes, discover missing episodes.
- tasks: ['purge-*', 'populate-*', 'fill-*', '*-manual', '*-rss', '*-discover']
schedule:
hour: '2-7/2'
##### Weekly cleanup of Transmission, Trakt TVshows list (fully watched && ended = delete from list) and harddrive.
- tasks: ['clean-*']
interval:
weeks: 1
templates:
##### Series config# Please uncomment `tracking: backfill` if you need Flexget to download as much as old episodes as it can find. Do the same in series-discover-episodes and series-discover-seasons tasks
series:
thetvdb_lookup: yes
tvmaze_lookup: yes
configure_series:
from:
entry_list: trakt-series
settings:
identified_by: ep
timeframe: 1 hours
target: webrip+ <1080p h264+
quality: webrip+ <=1080p h264+
propers: 48 hours
specials: no
season_packs: 3
# tracking: backfill
content_size:
min: 100
content_filter:
require:
- '*.mkv'
- '*.mp4'
##### Movies config#
movies-HQ:
tmdb_lookup: yes
movie_list: trakt-movies
quality: 1080p webdl+
content_size:
min: 8000
max: 25000
movies-NQ:
tmdb_lookup: yes
movie_list: trakt-movies
quality: 1080p webdl+
content_size:
min: 2000
max: 7999
movies-LQ:
tmdb_lookup: yes
movie_list: trakt-movies
quality: 720p webdl+
content_size:
min: 900
max: 8000
##### Transmission config#
transmission-anchors:
_transmission-settings: &transmission-settings
host: "{? transmission.host ?}"
port: 9091
username: "{? transmission.user ?}"
password: "{? transmission.pass ?}"
##### Common rejections#
reject:
regexp:
reject:
- \b(s|d)ub(s|bed|lado|titulado)?\b
- \bhc\b
- \bdual\b
- \b3d\b
- \bfre(nch)?\b
- \bita(lian)?\b
- \bspa(nish)?\b
- \bger(man)?\b
- \bcastellano\b
- \brus(sian)?\b
- \btamil\b
- \bhindi\b
content_filter:
reject:
- '*.rar'
- '*.zip'
##### ADVANCED SETTINGS #####
##### Global config#
global:
no_entries_ok: yes
pathscrub: windows
free_space:
path: "/{? folder.root ?}"
space: 5000
# Requires log_filter plugin
log_filter:
task:
- marked seen
- because quality already downloaded
- because episode has already been downloaded
- Task does not have any
move:
- left because it exceeds safety value
- does not exists (anymore)
urlrewriter:
- URL rewritten to
enzyme.mkv:
- Reading
- Processing
enzyme.parsers.ebml.core:
- ignored
- Maximum level
subliminal.video:
- Scanning video
parser_internal:
- appears to be an episode pack
content_size:
- rejecting
search_rss:
- Error
assume_quality:
- ""
utils.requests:
- Waiting
##### Common torrents config#
torrents:
torrent_alive:
min_seeds: 3
reject_for: 15 minutes
magnets: no
# Might need to disable if you are getting errors connecting to https sources
# Can remove if you upgrade to python 2.7.9+ or install requests[security]
verify_ssl_certificates: no
domain_delay:
thepiratebay.se: 10 seconds
thepiratebay.org: 10 seconds
limetorrents: 3 seconds
anidex.info: 3 seconds
bt-chat.com: 1 seconds
ezrss.it: 1 seconds
showrss.info: 2 seconds
torlock.eu: 1 seconds
torrenticity.com: 1 seconds
zooqle.com: 2 seconds
urlrewrite:
torrentz2:
regexp: 'http://torrentz2.eu/(?P<id>\w*)'
format: 'magnet:?xt=urn:btih:\g<id>&dn=&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce'
##### Transmission series config#
transmission-series:
transmission:
<<: *transmission-settings
main_file_only: yes
include_subs: yes
rename_like_files: yes
content_filename: "{{tvdb_series_name|escape|replace(''', '')|pathscrub}} - {{series_id}}{% if tvdb_ep_name|default(False) %} - {{tvdb_ep_name|pathscrub}}{% endif %}{% if quality|default(False) %} - [{{quality}}]{% endif %}"
path: "/{? folder.root ?}{? folder.downseries ?}{{tvdb_series_name|default(series_name)|pathscrub}}/"
##### Transmission movies config#
transmission-movies:
transmission:
<<: *transmission-settings
main_file_only: yes
include_subs: yes
rename_like_files: yes
content_filename: "{{tmdb_name|pathscrub}} ({{tmdb_year}}){% if quality|default(False) %} - [{{quality}}]{% endif %}{% if release_group|default(False) %} - [{{release_group}}]{% endif %}"
path: "/{? folder.root ?}{? folder.downmovies ?}{{movie_name|pathscrub}}"
##### Pushbullet config#
# pushbullet:
# notify:
# entries:
# title: "[flexget] {{task}}"
# message: "{{title}}"
# via:
# - pushbullet:
# api_key: "{? pushbullet.api ?}"
##### Disable builtins for some tasks#
disable-seen-retry:
disable:
- seen
- seen_info_hash
- retry_failed
##### Series metainfo mainly for move and update tasks#
series-metainfo:
metainfo_series: yes
thetvdb_lookup: yes
##### Guessit parsing for some series tasks, not applied to all tasks because it causes issues with "name (year)" based series, like scandal#
series-guessit:
parsing:
series: guessit
##### Movies metainfo mainly for move and update tasks#
movies-metainfo:
tmdb_lookup: yes
parsing:
movie: guessit
metainfo_movie: yes
##### Move template, only necessary if you rename files AFTER they are downloaded.
# move-series:
# move:
# to: "/{? folder.root ?}{? folder.series ?}{{tvdb_series_name|escape|replace(''', '')|pathscrub}}/S{{series_season|pad(2)}}/"
# rename: "{{tvdb_series_name|default(series_name)}} - {{tvdb_ep_id|default(series_id)}}{% if tvdb_ep_name|default(False) %} - {{tvdb_ep_name|pathscrub}}{% endif %}{% if quality|default(False) %} - [{{quality}}]{% endif %}"
# along:
# extensions:
# - srt
# - sub
# subdirs:
# - Subs
# clean_source: 50
# kodi_library:
# action: scan
# category: video
# url: http://localhost
# port: 8080
# list_add:
# - subtitle_list:
# list: subtitles
# path: "{{location}}"
# remove_after: 7 days
tasks:
########## SERIES ##########
# SYNC WITH TRAKT
##### First run only (use ~/flexget/bin/flexget execute --now) Sync Flexget database with watched status in Trakt#
get-series-nextep:
priority: 2
template:
- disable-seen-retry
- series-metainfo
list_clear:
what:
- entry_list: trakt-series-begin
next_trakt_episodes:
account: "{? trakt.account ?}"
list: "{? trakt.series ?}"
context: watched
position: next
accept_all: yes
list_add:
- entry_list: trakt-series-begin
set-series-nextep:
priority: 3
template:
- disable-seen-retry
- series-metainfo
entry_list: trakt-series-begin
accept_all: yes
set:
series_name: "{{tvdb_series_name|escape|replace(''', '')}}"
set_series_begin: yes
# SCAN DATABASE
##### Populates the series database with the files on the library, to avoid duplicate downloads#
populate-series-db:
priority: 4
template:
- series-metainfo
seen: local
filesystem:
path: "/{? folder.root ?}{? folder.series ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
accept_all: yes
configure_series:
from:
filesystem:
path: "/{? folder.root ?}{? folder.series ?}"
retrieve: dirs
settings:
tracking: no
identified_by: ep
##### Fetch, format and output trakt series list to a custom entry list#
fill-series-list:
priority: 5
template:
- disable-seen-retry
- series-metainfo
list_clear:
what:
- entry_list: trakt-series
trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.series ?}"
type: shows
accept_all: yes
set:
title: "{{tvdb_series_name|escape|replace(''', '')}}"
list_add:
- entry_list: trakt-series
# GET SERIES
##### Download episodes from manually downloaded torrents#
download-series-manual:
priority: 6
template:
- disable-seen-retry
- series-metainfo
- series-guessit
- transmission-series
filesystem:
path: "/{? folder.root ?}{? folder.downseries ?}"
mask: '*.torrent'
accept_all: yes
exec:
on_output:
for_accepted: rm -f "{{location}}"
##### Download episodes from RSS feeds#
download-series-rss:
priority: 7
template:
- series
- reject
- torrents
- transmission-series
inputs:
- rss: http://showrss.info/user/1450.rss?magnets=true&namespaces=true&name=null&quality=anyhd&re=yes
- rss: https://eztv.ag/ezrss.xml
- rss: https://rarbg.to/rssdd.php?category=1;18;41;49
- rss:
url: https://zooqle.com/search?q=%2A+category%3ATV&fmt=rss
title: 'torrent:fileName'
- rss: https://www.limetorrents.cc/rss/20/
##### Discover and download season packs# Please uncomment `backfill` if you need Flexget to download as much as old episodes as it can find. Do the same in series-discover-seasons task and series template.
download-seasons-discover:
priority: 8
template:
- series
- reject
- torrents
- transmission-series
- series-metainfo
#season lookup not supported by thetvdb
thetvdb_lookup: no
magnets: yes
convert_magnet:
timeout: 180 seconds
force: yes
discover:
release_estimations: strict
interval: 15 minutes
what:
- next_series_seasons: yes
# backfill: yes
from:
- piratebay:
category: highres tv
- limetorrents:
category: tv
- rarbg:
category: [1, 18, 41, 49]
- search_rss: https://torrentz2.eu/feed?f=\{{search_term}}
##### Discover and download older episodes# Please uncomment `tracking: backfill` if you need Flexget to download as much as old episodes as it can find. Do the same in series-discover-seasons task and series template.
download-series-discover:
priority: 9
template:
- series
- reject
- torrents
- transmission-series
- series-metainfo
magnets: yes
convert_magnet:
timeout: 180 seconds
force: yes
discover:
release_estimations: strict
interval: 15 minutes
what:
- next_series_episodes: yes
# backfill: yes
from:
- piratebay:
category: highres tv
- limetorrents:
category: tv
- rarbg:
category: [1, 18, 41, 49]
- search_rss: https://torrentz2.eu/feed?f=\{{search_term}}
########## MOVIES ##########
##### Remove manually downloaded movies from the movie queue and trakt list#
purge-movies-queue:
priority: 11
template:
- disable-seen-retry
- movies-metainfo
filesystem:
path: "/{? folder.root ?}{? folder.movies ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
accept_all: yes
list_remove:
- movie_list: trakt-movies
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.movies ?}"
type: movies
##### Fill the movie queue with movies from trakt list#
fill-movies-queue:
priority: 12
trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.movies ?}"
type: movies
strip_dates: yes
accept_all: yes
list_add:
- movie_list: trakt-movies
##### Download movies manually downloaded torrents#
download-movies-manual:
priority: 13
template:
- disable-seen-retry
- movies-metainfo
- transmission-movies
filesystem:
path: "/{? folder.root ?}{? folder.downmovies ?}"
mask: '*.torrent'
accept_all: yes
exec:
on_output:
for_accepted: rm -f "{{location}}"
list_remove:
- movie_list: trakt-movies
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.movies ?}"
type: movies
##### Discover and download 1080p movies with good bitrate (min. 8GB)#
download-movies-HQ-discover:
priority: 14
template:
- movies-HQ
- reject
- torrents
- transmission-movies
exists_movie:
- "/{? folder.root ?}{? folder.downmovies ?}"
- "/{? folder.root ?}{? folder.movies ?}"
magnets: yes
convert_magnet:
timeout: 180 seconds
force: yes
seen: local
discover:
release_estimations: loose
interval: 15 minutes
what:
- movie_list: trakt-movies
from:
- piratebay:
category: highres movies
- limetorrents:
category: movies
list_match:
from:
- movie_list: trakt-movies
list_remove:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.movies ?}"
type: movies
##### Discover and download NQ movies (fullHD min 2GB), if the movie is not recent#
download-movies-NQ-discover:
priority: 15
template:
- movies-NQ
- reject
- torrents
- transmission-movies
exists_movie:
- "/{? folder.root ?}{? folder.downmovies ?}"
- "/{? folder.root ?}{? folder.movies ?}"
magnets: yes
convert_magnet:
timeout: 180 seconds
force: yes
seen: local
discover:
release_estimations: loose
interval: 15 minutes
what:
- movie_list: trakt-movies
from:
- piratebay:
category: highres movies
- limetorrents:
category: movies
list_match:
from:
- movie_list: trakt-movies
list_remove:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.movies ?}"
type: movies
##### Discover and download lower quality/bitrate movies (1-8GB 720p), if the movie is not recent#
download-movies-LQ-discover:
priority: 16
template:
- movies-LQ
- reject
- torrents
- transmission-movies
exists_movie:
- "/{? folder.root ?}{? folder.downmovies ?}"
- "/{? folder.root ?}{? folder.movies ?}"
magnets: yes
convert_magnet:
timeout: 180 seconds
force: yes
seen: local
discover:
release_estimations: loose
interval: 15 minutes
what:
- movie_list: trakt-movies
from:
- piratebay:
category: highres movies
- limetorrents:
category: movies
list_match:
from:
- movie_list: trakt-movies
list_remove:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.movies ?}"
type: movies
########## SUBTITLES (attempt 1/2) ##########
##### The first attempt to find subtitles by searching for a match before renaming files.
find-subtitles-series:
priority: 21
template:
- disable-seen-retry
filesystem:
path: "/{? folder.root ?}{? folder.downseries ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
accept_all: yes
seen: local
subliminal:
languages:
- eng
exact_match: yes
single: no
providers: [opensubtitles, addic7ed, tvsubtitles, podnapisi]
authentication:
opensubtitles:
username: "{? subtitles.user ?}"
password: "{? subtitles.pass ?}"
addic7ed:
username: "{? subtitles.user ?}"
password: "{? subtitles.pass ?}"
##### The first attempt to find subtitles by searching for a match before renaming files.
find-subtitles-movies:
priority: 22
template:
- disable-seen-retry
filesystem:
path: "/{? folder.root ?}{? folder.downmovies ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
accept_all: yes
seen: local
subliminal:
languages:
- eng
exact_match: yes
single: no
providers: [opensubtitles, addic7ed, tvsubtitles, podnapisi]
authentication:
opensubtitles:
username: "{? subtitles.user ?}"
password: "{? subtitles.pass ?}"
addic7ed:
username: "{? subtitles.user ?}"
password: "{? subtitles.pass ?}"
########## LIBRARY ##########
move-series:
priority: 31
template:
- disable-seen-retry
- series-metainfo
- series-guessit
filesystem:
path: "/{? folder.root ?}{? folder.downseries ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
accept_all: yes
move:
to: "/{? folder.root ?}{? folder.series ?}{{tvdb_series_name|escape|replace(''', '')|pathscrub}}/S{{series_season|pad(2)}}/"
rename: "{{tvdb_series_name|escape|replace(''', '')|pathscrub}} - {{series_id}}{% if tvdb_ep_name|default(False) %} - {{tvdb_ep_name|pathscrub}}{% endif %}{% if quality|default(False) %} - [{{quality}}]{% endif %}"
along:
extensions:
- srt
- sub
subdirs:
- Subs
clean_source: 50
kodi_library:
action: scan
category: video
url: "{? kodi.host ?}"
port: 8080
list_add:
- subtitle_list:
list: subtitles
path: "{{location}}"
remove_after: 7 days
exec:
on_exit:
phase: find "/{? folder.root ?}{? folder.downseries ?}"* -type d -empty -delete
##### First add the downloaded series a list, this allows us to solve issues with files that have incorrect filenames.
# move-series-list:
# priority: 32
# template:
# - disable-seen-retry
# - series-metainfo
# list_clear:
# what:
# - entry_list: downloaded-series
# filesystem:
# path: "/{? folder.root ?}{? folder.downseries ?}"
# recursive: yes
# retrieve: files
# regexp: '.*\.(avi|mkv|mp4)$'
# accept_all: yes
# list_add:
# - entry_list: downloaded-series
##### Now move series from downloads folder to respective folders, along with existing subtitles and adding the files to the subtitle queue
# move-series-SxxEyy:
# priority: 33
# template:
# - disable-seen-retry
# - series-metainfo
# - move-series
# entry_list: downloaded-series
# accept_all: yes
# require_field: tvdb_series_name
# exec:
# on_exit:
# phase: find "/{? folder.root ?}{? folder.downseries ?}"* -type d -empty -delete
##### Fix the leftovers: Move series with incoreect epid numbering were rejected by the move-series task due to incorrect filename (SSEE instead of SxxEyy).
# move-series-SSEE:
# priority: 34
# template:
# - disable-seen-retry
# - series-metainfo
# - move-series
# entry_list: downloaded-series
# accept_all: yes
# manipulate:
# - title:
# replace:
# regexp: '([01]\d)([0-2]\d)'
# format: 'S\1E\2'
# - filename:
# from: title
# require_field: tvdb_series_name
# exec:
# on_exit:
# phase: find "/{? folder.root ?}{? folder.downseries ?}"* -type d -empty -delete
##### Fix the leftovers: downloaded series that were rejected by the move-series task due to incorrect filename (SEE instead of SxxEyy), will get a title fix and should get moved on next run.
# move-series-SEE:
# priority: 35
# template:
# - disable-seen-retry
# - series-metainfo
# - move-series
# entry_list: downloaded-series
# accept_all: yes
# manipulate:
# - title:
# replace:
# regexp: '([1-9])([0-2]\d)'
# format: 'S\1E\2'
# - filename:
# from: title
# require_field: tvdb_series_name
# exec:
# on_exit:
# phase: find "/{? folder.root ?}{? folder.downseries ?}"* -type d -empty -delete
##### Move movies from downloads folder to the movies folder, along with possible subtitles and adding the files to the subtitle queue#
move-movies:
priority: 36
template:
- disable-seen-retry
- movies-metainfo
require_field: tmdb_name
filesystem:
path: "/{? folder.root ?}{? folder.downmovies ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
accept_all: yes
regexp:
reject:
- \btrailer\b
- \bsample\b
move:
to: "/{? folder.root ?}{? folder.movies ?}"
rename: "{{tmdb_name|pathscrub}} ({{tmdb_year}}){% if quality|default(False) %} - [{{quality}}]{% endif %}{% if release_group|default(False) %} - [{{release_group}}]{% endif %}"
along:
extensions:
- srt
- sub
subdirs:
- Subs
clean_source: 100
kodi_library:
action: scan
category: video
url: "{? kodi.host ?}"
port: 8080
list_add:
- subtitle_list:
list: subtitles
path: "{{location}}"
remove_after: 7 days
exec:
on_exit:
phase: find "/{? folder.root ?}{? folder.downmovies ?}"* -type d -empty -delete
########## SUBTITLES (attempt 2/2) ##########
##### Download subtitles for the previously queued files#
get-subtitles:
priority: 40
template:
- disable-seen-retry
subtitle_list:
list: subtitles
recursion_depth: 3
list_match:
from:
- subtitle_list:
list: subtitles
subliminal:
languages:
- eng
exact_match: yes
single: no
providers: [opensubtitles, addic7ed, tvsubtitles, podnapisi]
authentication:
opensubtitles:
username: "{? subtitles.user ?}"
password: "{? subtitles.pass ?}"
addic7ed:
username: "{? subtitles.user ?}"
password: "{? subtitles.pass ?}"
########## CLEANUP ##########
clean-transmission:
priority: 51
disable: details
clean_transmission:
<<: *transmission-settings
finished_for: 1 day
##### Remove ended or canceled series that have been watched from trakt list#
clean-series-list:
priority: 52
template:
- disable-seen-retry
- series-metainfo
trakt_lookup:
account: "{? trakt.account ?}"
username: "{? trakt.account ?}"
trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.series ?}"
type: shows
if:
- "tvdb_status == 'Ended' and trakt_watched": accept
list_remove:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.series ?}"
type: shows
##### Remove watched seasons from drive#
clean-old-seasons:
priority: 53
template:
- disable-seen-retry
- series-metainfo
entry_list: trakt-series-begin
accept_all: yes
if:
- series_season == 1 or series_episode == 1: reject
- series_season > 1:
set:
to_remove: "S{{(series_season-1)|pad(2)}}"
exec:
on_output:
for_accepted: find "/{? folder.root ?}{? folder.series ?}{{tvdb_series_name|escape|replace(''', '')}}" -type d -name "{{to_remove}}" -exec rm -r '{}' \;
kodi_library:
action: clean
category: video
url: "{? kodi.host ?}"
port: 8080