@@ -183,14 +183,20 @@ class FieldFilter(Filter):
183
183
throttle = "d.throttle_name=" ,
184
184
# tracker = "=",
185
185
186
- #done = "=",
187
- #down = "=",
186
+ is_active = "d.is_active=" ,
187
+ is_complete = "d.complete=" ,
188
+ is_ignored = "d.ignore_commands=" ,
189
+ is_multi_file = "d.is_multi_file=" ,
190
+ is_open = "d.is_open=" ,
191
+
192
+ # done = "=",
193
+ down = "d.down.rate=" ,
188
194
# fno = "=",
189
195
prio = "d.priority=" ,
190
196
ratio = "d.ratio=" ,
191
197
size = "d.size_bytes=" ,
192
- # up = "=",
193
- # uploaded = "=",
198
+ up = "d.up.rate =" ,
199
+ uploaded = "d.up.total =" ,
194
200
195
201
completed = "d.custom=tm_completed" ,
196
202
loaded = "d.custom=tm_loaded" ,
@@ -204,12 +210,7 @@ class FieldFilter(Filter):
204
210
#active last time a peer was connected
205
211
#directory directory containing download data
206
212
#files list of files in this item
207
- #is_active download active?
208
- #is_complete download complete?
209
213
#is_ghost has no data file or directory?
210
- #is_ignored ignore commands?
211
- #is_multi_file single- or multi-file download?
212
- #is_open download open?
213
214
#is_private private flag set (no DHT/PEX)?
214
215
#leechtime time taken from start to completion
215
216
#seedtime total seeding time after completion
@@ -357,6 +358,14 @@ class BoolFilter(FieldFilter):
357
358
""" Filter boolean values.
358
359
"""
359
360
361
+ def pre_filter (self ):
362
+ """ Return rTorrent condition to speed up data transfer.
363
+ """
364
+ if self ._name in self .PRE_FILTER_FIELDS :
365
+ return '"equal={},value={}"' .format (
366
+ self .PRE_FILTER_FIELDS [self ._name ], int (self ._value ))
367
+ return ''
368
+
360
369
def validate (self ):
361
370
""" Validate filter condition (template method).
362
371
"""
0 commit comments