PDA

View Full Version : Strange problem with advanced search



ulvi
2006-03-28, 22:49
I have a library with about 30 thousand tracks,
few hundred genres. While all the genres appear
correctly in the tags and in the full list of genres,
when I go to advanced search and click on the
genre drop-box, there is pecisely one genre which
does not appear there. I am using the official
6.2.1 version of slimserver.

In case this might be important, the genre that's
missing from the advanced search drop box is the one
with the largest number of tracks associated with it,
and it is "Bach" (my genres are composer names).

I tried rescanning (both partial and full) several
times with the same result.

Any ideas?

ceejay
2006-03-29, 00:08
Hi

Well, that was so interesting I had to have a look myself. I have far fewer Genres (37) so it was much easier for me to check - and I also have one missing in that box!

I'm using 6.2.2

However, it is not my "biggest" genre that's missing, but it is Genre number 1 in the Genres table. You might want to check that is also the case for "Bach" in yours - using the sqlite database browser if you have it?

So I then had a look in the code for "advanced_search.html" - which I can't pretend I fully understand, but the line:

[% NEXT IF NOT genre.name OR genre.id == 1 %]

may be relevant! My guess is that some logic isn't quite right here...

I can't see this in bugzilla - if no-one can tell us why this is happening, I'll post this as a bug later.

Regards
Ceejay

ceejay
2006-03-29, 10:56
Well, no-one's come back and said "its supposed to do that.." so I've filed a bug in bugzilla - http://bugs.slimdevices.com/show_bug.cgi?id=3224

Ulvi - if you want to add your own details to the bug report, that would be helpful... you can also add your email to the CC list which means you will be updated as this is dealt with. You will need to create an ID for yourself on bugzilla, it's not the same as the forum's.

Ceejay

MrC
2006-03-29, 12:00
Hi

So I then had a look in the code for "advanced_search.html" - which I can't pretend I fully understand, but the line:

[% NEXT IF NOT genre.name OR genre.id == 1 %]

may be relevant! My guess is that some logic isn't quite right here...


I believe the line:

[% NEXT IF NOT genre.name OR genre.id == 1 %]

should be

[% NEXT IF NOT genre.name %]

in EN\advanced_search.html (and/or the skin-specific advanced_search.html files). I've verified it works for me.

You can just edit the file, change the line, and reload the page.

ceejay
2006-03-29, 13:18
I believe the line:

[% NEXT IF NOT genre.name OR genre.id == 1 %]

should be

[% NEXT IF NOT genre.name %]

in EN\advanced_search.html (and/or the skin-specific advanced_search.html files). I've verified it works for me.

You can just edit the file, change the line, and reload the page.

Well, yes, I guessed that would be the case ... and yet, someone wrote that test in for a reason, and I can't for the life of me think what it is. In the bug report I've noted that on an early 6.5 the one Genre that gets left out is "No Genre", and I was just wondering if Genre ID 1 was always meant to be No Genre?

I really shouldn't speculate about code I don't understand, though....

Ceejay