-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathconfig.yml
912 lines (828 loc) · 21.3 KB
/
config.yml
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
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
variables: secrets.yml
schedules:
- tasks: ['populate-*', 'clean-*', 'update-*']
schedule:
hour: 0
- tasks: ['*-rss']
schedule:
minute: 0,30
- tasks: ['*-nextep','fill-*','*-discover', '*-manual']
schedule:
hour: '*/2'
- tasks: ['move-*', download-subtitles]
schedule:
minute: 15,45
templates:
##### Series config
#
series:
tvmaze_lookup: yes
include: series.yml
configure_series:
from:
entry_list: trakt-series
settings:
identified_by: ep
timeframe: 16 hours
target: hdtv+ 1080p
quality: webrip+ 720p-1080p
propers: 16 hours
specials: no
season_packs: 5
content_size:
min: 350
content_filter:
require:
- '*.mkv'
##### Anime series config
#
anime-series:
include: anime.yml
configure_series:
from:
entry_list: myanimelist-series
settings:
identified_by: sequence
timeframe: 4 hours
target: 1080p
quality: 720p-1080p
special_ids:
- OVA
content_filter:
require:
- '*.mkv'
- '*.mp4'
##### Anime movies config
#
anime-movies:
quality: 720p+ !workprint !cam !ts !tc !r5
content_size:
min: 700
max: 10000
##### Movies config
#
movies-1080p:
tmdb_lookup: yes
movie_list: trakt-movies
quality: 1080p webrip+
content_size:
min: 1000
max: 10000
movies-720p:
tmdb_lookup: yes
movie_list: trakt-movies
quality: 720p webrip+
content_size:
min: 500
max: 5000
##### 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
content_filter:
reject:
- '*.rar'
- '*.zip'
##### Anime rejections
#
anime-reject:
regexp:
reject:
- \bdub\b
- \bhard(subs|subbed)?\b
- \bpv\b
- \b60fps\b
##### ADVANCED SETTINGS #####
##### Global config
#
global:
no_entries_ok: yes
pathscrub: windows
free_space:
path: "/{? folder.root ?}"
space: 5000
log_filter:
- message: "is already marked seen in the task populate-series-db"
- message: "is before begin value"
- message: "because entity has already been downloaded"
- message: "because quality already downloaded"
- message: "appears to be an episode pack"
plugin: parser_internal
- message: "rejecting"
plugin: content_size
- message: "Field `title` is now "
plugin: manipulate
##### 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:
nyaa: 3 seconds
limetorrents: 3 seconds
##### Transmission series config
#
transmission-series:
transmission:
<<: *transmission-settings
main_file_only: yes
include_subs: yes
rename_like_files: yes
content_filename: "{{tvmaze_series_name|default(series_name)|pathscrub}} - {{series_id}}{% if tvmaze_episode_name|default(False) %} - {{tvmaze_episode_name|pathscrub}}{% endif %}{% if quality|default(False) %} - [{{quality}}]{% endif %}"
path: "/{? folder.root ?}{? folder.downseries ?}{{tvmaze_series_name|default(series_name)|pathscrub}}/"
##### Transmission anime config
#
transmission-anime:
transmission:
<<: *transmission-settings
main_file_only: yes
path: "/{? folder.root ?}{? folder.downanime ?}{{title}}/"
##### Transmission anime series config
#
transmission-anime-series:
transmission:
<<: *transmission-settings
main_file_only: yes
content_filename: "{{series_name}} - ep{{series_id}} - [{{quality}}]"
path: "/{? folder.root ?}{? folder.downanime ?}{{series_name|pathscrub}}/"
##### Transmission anime movies config
#
transmission-anime-movies:
transmission:
<<: *transmission-settings
main_file_only: yes
content_filename: "{{regexp}} - ep1 - [{{quality}}]"
path: "/{? folder.root ?}{? folder.downanime ?}{{regexp}}/"
##### 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 %}"
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
tvmaze_lookup: yes
##### Guessit parsing for some series tasks and anime, not applied to all tasks because it used to cause issues with some series
#
series-guessit:
parsing:
series: guessit
##### Movies metainfo mainly for move and update tasks
#
movies-metainfo:
tmdb_lookup: yes
parsing:
movie: guessit
##### Guessit parsing for anime movies task
#
movies-guessit:
parsing:
movie: guessit
tasks:
########## SERIES ##########
##### Populates the series database with the files on the library, to avoid duplicate downloads
#
populate-series-db:
priority: 1
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
##### Fetches the next unwatched episode from the series watchlist and adds it to a custom entry list
#
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
##### Formats the output of the previous task to tvmaze format and sets the begin episode for the series
#
set-series-nextep:
priority: 3
template:
- disable-seen-retry
- series-metainfo
entry_list: trakt-series-begin
accept_all: yes
set:
series_name: "{{tvmaze_series_name|escape|replace(''', '')}}"
set_series_begin: yes
##### Fetch, format and output trakt series list to a custom entry list
#
fill-series-list:
priority: 4
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: "{{tvmaze_series_name|escape|replace(''', '')}}"
list_add:
- entry_list: trakt-series
##### Download episodes from manually downloaded torrents
#
download-series-manual:
priority: 6
template:
- disable-seen-retry
- series-metainfo
- series-guessit
- transmission-series
- pushbullet
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
- pushbullet
inputs:
- rss: https://eztv.re/ezrss.xml
- rss: https://www.limetorrents.info/rss/20/
##### Discover and download season packs
#
download-seasons-discover:
priority: 8
template:
- series
- reject
- torrents
- transmission-series
- pushbullet
magnets: yes
convert_magnet:
timeout: 10 seconds
force: yes
discover:
release_estimations: strict
interval: 15 minutes
what:
- next_series_seasons:
from_start: yes
from:
- piratebay:
category: highres tv
- limetorrents:
category: tv
##### Discover and download older episodes and pilots from recently added series
#
download-series-discover:
priority: 9
template:
- series
- reject
- torrents
- transmission-series
- pushbullet
magnets: yes
convert_magnet:
timeout: 10 seconds
force: yes
discover:
release_estimations: strict
interval: 15 minutes
what:
- next_series_episodes:
from_start: yes
from:
- piratebay:
category: highres tv
- limetorrents:
category: tv
########## ANIME ##########
##### Fetch, format and output myanimelist series list to a custom entry list
#
fill-anime-series-list:
priority: 11
template:
- disable-seen-retry
metainfo_series: yes
list_clear:
what:
- entry_list: myanimelist-series
domain_delay:
myanimelist.net: 5 seconds
myanimelist:
user_id: "{? myanimelist.id ?}"
list: both
type: shows
accept_all: yes
set:
title: "{{myanimelist_name|re_replace('[-/:;.★](?=[a-zA-Z])', ' ')|re_replace('[:;](?![a-zA-Z])|[`´()]|TV|', '')|re_replace('Season ', 'S')|re_replace(' +', ' ')}}"
list_add:
- entry_list: myanimelist-series
##### Fill the movie queue with movies from trakt list
#
fill-anime-movies-queue:
priority: 13
seen:
fields:
- myanimelist_name
domain_delay:
myanimelist.net: 5 seconds
myanimelist:
user_id: "{? myanimelist.id ?}"
list: both
type: movies
accept_all: yes
set:
title: "{{myanimelist_name|re_replace('[-/:;.★](?=[a-zA-Z])', ' ')|re_replace('[:;](?![a-zA-Z])|[`´()]', '')}}"
list_add:
- regexp_list: myanimelist-movies
##### Download anime from manually downloaded torrents
#
download-anime-manual:
priority: 14
template:
- disable-seen-retry
- transmission-anime
- pushbullet
filesystem:
path: "/{? folder.root ?}{? folder.downanime ?}"
mask: '*.torrent'
accept_all: yes
exec:
on_output:
for_accepted: rm -f "{{location}}"
##### Download anime from RSS feed from verified groups
#
download-anime-series-rss:
priority: 15
template:
- anime-series
- anime-reject
- torrents
- transmission-anime-series
- pushbullet
inputs:
- rss: https://nyaa.si/?page=rss&c=1_2&f=2
##### Download anime from RSS feed from all groups
#
download-anime-series-all-rss:
priority: 16
delay: 2 days
template:
- anime-series
- anime-reject
- torrents
- transmission-anime-series
- pushbullet
inputs:
- rss: https://nyaa.si/?page=rss&c=1_2
##### Discover and download anime from verified groups
#
download-anime-series-discover:
priority: 18
template:
- anime-series
- anime-reject
- torrents
- transmission-anime-series
- pushbullet
metainfo_series: yes
discover:
release_estimations: ignore
interval: 15 minutes
what:
- next_series_episodes:
from_start: yes
backfill: yes
from:
- nyaa:
category: anime eng
filter: trusted only
##### Discover and download anime from all groups
#
download-anime-series-all-discover:
priority: 19
delay: 2 days
template:
- anime-series
- anime-reject
- torrents
- transmission-anime-series
- pushbullet
metainfo_series: yes
discover:
release_estimations: ignore
interval: 15 minutes
what:
- next_series_episodes:
from_start: yes
backfill: yes
from:
- nyaa:
category: anime eng
filter: all
##### Discover and download anime movies
#
download-anime-movies-discover:
priority: 20
template:
- anime-movies
- anime-reject
- torrents
- transmission-anime-movies
- pushbullet
discover:
release_estimations: ignore
interval: 15 minutes
what:
- regexp_list: myanimelist-movies
from:
- nyaa:
category: anime eng
filter: all
list_match:
from:
- regexp_list: myanimelist-movies
########## MOVIES ##########
##### Remove manually downloaded movies from the movie queue and trakt list
#
clean-movies-queue:
priority: 31
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: 32
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: 34
template:
- disable-seen-retry
- movies-metainfo
- transmission-movies
- pushbullet
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
#
download-movies-1080p-discover:
priority: 37
template:
- movies-1080p
- reject
- torrents
- transmission-movies
- pushbullet
exists_movie:
- "/{? folder.root ?}{? folder.downmovies ?}"
- "/{? folder.root ?}{? folder.movies ?}"
magnets: yes
convert_magnet:
timeout: 10 seconds
force: yes
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 720p movies, if the movie is not recent
#
download-movies-720p-discover:
priority: 38
template:
- movies-720p
- reject
- torrents
- transmission-movies
- pushbullet
exists_movie:
- "/{? folder.root ?}{? folder.downmovies ?}"
- "/{? folder.root ?}{? folder.movies ?}"
magnets: yes
convert_magnet:
timeout: 10 seconds
force: yes
discover:
release_estimations: loose
interval: 15 minutes
what:
- movie_list: trakt-movies
from:
- piratebay:
category: highres movies
- limetorrents:
category: movies
if:
- tmdb_year > now.year - 1: reject
list_match:
from:
- movie_list: trakt-movies
list_remove:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.movies ?}"
type: movies
########## LIBRARY ##########
##### Move series from downloads folder to respective folders, along with existing subtitles and adding the files to the subtitle queue
#
move-series:
priority: 41
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 ?}{{tvmaze_series_name|escape|replace(''', '')|pathscrub}}/"
rename: "{{tvmaze_series_name|escape|replace(''', '')|pathscrub}} - {{series_id}}{% if tvmaze_episode_name|default(False) %} - {{tvmaze_episode_name|pathscrub}}{% endif %}{% if quality|default(False) %} - [{{quality}}]{% endif %}"
along:
extensions:
- srt
- sub
subdirs:
- Subs
clean_source: 50
list_add:
- subtitle_list:
list: subtitles
path: "{{location}}"
remove_after: 2 days
exec:
on_exit:
phase: find "/{? folder.root ?}{? folder.downseries ?}"* -type d -empty -delete
##### Move anime from downloads folder to respective folders
#
move-anime:
priority: 42
template:
- disable-seen-retry
- series-guessit
filesystem:
path: "/{? folder.root ?}{? folder.downanime ?}"
recursive: yes
retrieve: files
regexp: '.*\.(avi|mkv|mp4)$'
metainfo_series: yes
accept_all: yes
move:
to: "/{? folder.root ?}{? folder.anime ?}{{series_name|default(title)|pathscrub}}/"
along:
extensions:
- srt
clean_source: 50
exec:
allow_background: yes
on_exit:
phase:
- find "/{? folder.root ?}{? folder.downanime ?}"* -type d -empty -delete
### REMOVE THE LINES BELOW IF YOU DONT WANT TO RENAME ANIME WITH THE EXTERNAL SCRIPT
- "{? script.animerenamer ?}"
on_output:
for_accepted: echo "{{location}}" >> "{? list.animerename ?}"
##### Move movies from downloads folder to the movies folder, along with possible subtitles and adding the files to the subtitle queue
#
move-movies:
priority: 43
template:
- disable-seen-retry
- movies-metainfo
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 %}"
along:
extensions:
- srt
- sub
subdirs:
- Subs
clean_source: 100
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
##### Download subtitles for the previously queued files
#
download-subtitles:
priority: 45
template:
- disable-seen-retry
subtitle_list:
list: subtitles
list_match:
from:
- subtitle_list:
list: subtitles
subliminal:
exact_match: yes
languages:
- eng
##### Clean finished torrents from transmission
#
clean-transmission:
priority: 47
template:
- disable-seen-retry
from_transmission:
<<: *transmission-settings
if:
- transmission_date_done == None: fail
- not transmission_seed_ratio_ok and not transmission_idle_limit_ok: reject
- transmission_date_done < now.astimezone() - timedelta(days=1): accept
transmission:
<<: *transmission-settings
action: remove
########## UPDATES ##########
##### Update trakt series list from local series folders, excluding the ones that already ended
#
update-series-list:
priority: 51
template:
- disable-seen-retry
- series-metainfo
filesystem:
path: "/{? folder.root ?}{? folder.series ?}"
retrieve: dirs
manipulate:
- title:
replace:
regexp: '$'
format: ' S01E01'
accept_all: yes
if:
- tvmaze_series_status == 'Ended': reject
list_add:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.series ?}"
type: shows
##### Clean the series that already ended from trakt series list
#
clean-series-list:
priority: 53
delay: 8 day
template:
- disable-seen-retry
- series-metainfo
- pushbullet
trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.series ?}"
type: shows
if:
- tvmaze_series_status == 'Ended': accept
list_add:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.ended ?}"
type: shows
list_remove:
- trakt_list:
account: "{? trakt.account ?}"
list: "{? trakt.series ?}"
type: shows