keyword search includes trcker status

This commit is contained in:
Martijn Voncken 2008-10-24 21:05:14 +00:00
parent 03d1177085
commit 352427ca20
1 changed files with 6 additions and 1 deletions

View File

@ -43,8 +43,13 @@ def filter_keyword(torrent_ids, values):
#filter:
for keyword in keywords:
for torrent_id in torrent_ids:
if keyword in all_torrents[torrent_id].filename.lower():
torrent = all_torrents[torrent_id]
if keyword in torrent.filename.lower():
yield torrent_id
#i want to find broken torrents.
elif keyword in torrent.tracker_status.lower():
yield torrent_id
class FilterManager(component.Component):
"""FilterManager