Ticket #247 (closed defect: fixed)
Search filters defect in SVN, fix included
| Reported by: | quinox | Owned by: | daelstorm |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | nicotine | Version: | |
| Keywords: | search filter | Cc: |
Description
Whenever I search for stuff I get the following traceback:
Traceback (most recent call last):
File "/home/quinox/chroot/opt/nicotine+/pynicotine/gtkgui/search.py", line 692, in _realaddresults
res = self.append(r)
File "/home/quinox/chroot/opt/nicotine+/pynicotine/gtkgui/search.py", line 738, in append
if not self.filters or self.check_filter(row):
File "/home/quinox/chroot/opt/nicotine+/pynicotine/gtkgui/search.py", line 842, in check_filter
if filters[3] and not self.checkDigit(filters[3], row[11], False):
File "/home/quinox/chroot/opt/nicotine+/pynicotine/gtkgui/search.py", line 827, in checkDigit
if eval(str(value)+op+str(filter), {}):
File "<string>", line 1
x:\mp3\pop\retro party classics\song_file_name_here.mp3>=150
SyntaxError?: invalid syntax
As you can see it compared the file name to the minimal desired bitrate, which doesn't work. The consequence of this is that if you turn on the filters, you will never see any results.
The problem is on line 845 of the pynicotine/gtkgui/search.py file. It now reads:
if filters[3] and not self.checkDigit(filters[3], row[11], False):
It should be
if filters[3] and not self.checkDigit(filters[3], row[10], False):
Once this is changed the filter system within the search tab works again
