@@ -14,7 +14,7 @@ workflows:
14
14
- if_else :
15
15
condition :
16
16
and :
17
- - " torrent.files.map(f, f.fileType == fileType .audio ? f.size : - f.size).sum() > 50*mb"
17
+ - " torrent.files.map(f, f.extension in extensions .audio ? f.size : - f.size).sum() > 50*mb"
18
18
- or :
19
19
- " torrent.baseName.matches(keywords.audiobook)"
20
20
- " torrent.files.filter(f, f.extension in extensions.audiobook).size() > 0"
@@ -40,19 +40,22 @@ workflows:
40
40
- " torrent.files.map(f, f.extension in extensions.music ? f.size : - f.size).sum() > 0"
41
41
- and :
42
42
- " torrent.baseName.matches(keywords.music)"
43
- - " torrent.files.map(f, f.fileType == fileType .audio ? f.size : - f.size).sum() > 0"
43
+ - " torrent.files.map(f, f.extension in extensions .audio ? f.size : - f.size).sum() > 0"
44
44
if_action :
45
45
set_content_type : music
46
46
else_action : unmatched
47
47
# match software:
48
48
- if_else :
49
- condition : " torrent.files.map(f, f.fileType == fileType .software ? f.size : - f.size).sum() > 0"
49
+ condition : " torrent.files.map(f, f.extension in extensions .software ? f.size : - f.size).sum() > 0"
50
50
if_action :
51
51
set_content_type : software
52
52
else_action : unmatched
53
53
# match xxx:
54
54
- if_else :
55
- condition : " ([torrent.baseName] + torrent.files.map(f, f.basePath)).join(' ').matches(keywords.xxx)"
55
+ condition :
56
+ and :
57
+ - " torrent.files.map(f, (f.extension in extensions.video || f.extension in extensions.image) ? f.size : - f.size).sum() > 0"
58
+ - " ([torrent.baseName] + torrent.files.map(f, f.basePath)).join(' ').matches(keywords.xxx)"
56
59
if_action :
57
60
set_content_type : xxx
58
61
else_action : unmatched
@@ -78,7 +81,7 @@ workflows:
78
81
condition :
79
82
or :
80
83
- " result.contentType in [contentType.movie, contentType.tv_show]"
81
- - " torrent.files.map(f, f.fileType == fileType .video ? f.size : - f.size).sum() > 100*mb"
84
+ - " torrent.files.map(f, f.extension in extensions .video ? f.size : - f.size).sum() > 100*mb"
82
85
if_action :
83
86
find_match :
84
87
# parse video-related attributes from the torrent name;
@@ -105,6 +108,16 @@ workflows:
105
108
- " flags.delete_xxx && result.contentType == contentType.xxx"
106
109
if_action : delete
107
110
extensions :
111
+ audio :
112
+ - mp3
113
+ - wav
114
+ - flac
115
+ - aac
116
+ - ogg
117
+ - m4a
118
+ - m4b
119
+ - mid
120
+ - dsf
108
121
audiobook :
109
122
- m4b
110
123
comic :
@@ -128,6 +141,18 @@ extensions:
128
141
- odt
129
142
- pdf
130
143
- rtf
144
+ image :
145
+ - jpg
146
+ - jpeg
147
+ - png
148
+ - gif
149
+ - bmp
150
+ - svg
151
+ - dds
152
+ - psd
153
+ - tif
154
+ - tiff
155
+ - ico
131
156
music :
132
157
- ape
133
158
- dsf
@@ -149,6 +174,19 @@ extensions:
149
174
- pkg
150
175
- rpm
151
176
- sh
177
+ video :
178
+ - mp4
179
+ - mkv
180
+ - avi
181
+ - iso
182
+ - mov
183
+ - wmv
184
+ - flv
185
+ - m4v
186
+ - mpg
187
+ - mpeg
188
+ - ts
189
+ - vob
152
190
keywords :
153
191
audiobook :
154
192
- audiobooks?
0 commit comments