Ticket #247 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

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

Attachments

Change History

Changed 8 months ago by quinox

BTW, the other references to row[] within that same function might need to be altered as well if the breakdown was caused by a change of the row variable. I tested the other options and they seem to work as expected - I did not test the country filter since I don't use GeoIP

Changed 8 months ago by daelstorm

  • status changed from new to closed
  • resolution set to fixed

(In [694]) Apply Quinox's fix for broken bitrate filter (Fixes: #247)

Add/Change #247 (Search filters defect in SVN, fix included)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.