Bug 1797 - Wrong Sorting Order in "Browse Songs"
: Wrong Sorting Order in "Browse Songs"
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Player UI
: 6.1.0
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-11 04:43 UTC by Dieter
Modified: 2009-09-08 09:29 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter 2005-07-11 04:43:37 UTC
When I choose "browse songs" on my Squeezebox2 the songs are not sorted by song
titles but by artist. You recognize that only if you have the artist included in
the title format used for display. Within each artist the songs seem to be
sorted by albums and further by song numbers within an album.

With this ordering it is not possible to search for a certain song using its
title (like it is possible for album titles with "browse album" or with artist
names with "browse artist").
Comment 1 KDF 2005-07-11 10:16:45 UTC
its not possible to browse, but there is very definitely a SEARCH option that
makes it entirely possible.  you may not like this, but as I recall, the browse
songs mode was intended to have been removed a long time ago.  It was certainly
removed from web interface on the basis that it was slow and didn't work. The
'bug' here is really that it was left behind as an option in the player menus.
Comment 2 Blackketter Dean 2005-07-11 10:28:37 UTC
I believe that browsing songs when not in an Album context should be sorted alphabetically.  Dan, is 
this a hard thing to do?
Comment 3 Dieter 2005-07-11 10:40:25 UTC
I was always wondering why the "browse songs" has no counterpart on the web
interface, your comment explained that now.
I know the SEARCH option but I use Browse (for album titles) and Search (for
album titles) in different situations. I am used to set the option in SlimServer
that SEARCH will no only search at the beginning but also within a word so
SEARCHING finds a lot of matching results (which I like in some cases). But
Search is hard to use since I have to input a lot of characters to reduce the
number of found results. I usually use BROWSE to quickly jump to the beginning
of the next character block by inputting the start character and then browse
through the shown results with the arrow down key. So in some cases you would
find a desired song much faster if the songs were sorted alphabetically when
using "browse songs".
I noted that the first time when I selct browse songs it takes about 2 minutes
until the song list is shown on my Squeezebox2 (I have about 5500 songs).
Selecting browse songs at a later stage takes only about 10-12 seconds. The 2
minutes prevented that I use browse songs in practice. The sorting issue was an
additional drawback.
So for me changing the sorting (if this should be possible) should be combined
with an acceleration of preparing the song list (which seems to be possible
since the second trial needs only 10 seconds).

At the moment I have deleted browse songs from the menu.

Dieter
Comment 4 KDF 2005-07-11 10:56:02 UTC
Dean,  the sorting is specified as 'title' in the code, but for some odd reason
doesn't actually give results to match. I suspect that the common use of 'track'
listing as a sublevel has left it susceptible to client param data that might be
left around from previous modes.
Comment 5 Dan Sully 2005-07-11 11:22:50 UTC
kdf - do you have time to look into this?

Thanks.
Comment 6 KDF 2005-07-11 11:46:23 UTC
ok, I have a solution for this but I have concerns over hos it affects other
browse modes.

for track listings, we sort by track number when an album has been previously
selected.  What should be the right order when it comes to 'artist', or 'genre' ?

Dean, is track title sorting sufficient here as well?
Comment 7 Blackketter Dean 2005-07-11 11:56:59 UTC
if it's not filtered by album, then they should be in alphabetical order.  
Comment 8 KDF 2005-07-11 13:21:13 UTC
ok, cool.  That means it looks like all we need is to change Pages.pm, line 92 from:
return $ds->find('track', $findCriteria, exists $findCriteria->{'album'} ?
'tracknum' : 'track');
to:
return $ds->find('track', $findCriteria, exists $findCriteria->{'album'} ?
'tracknum' : 'title');

I can merge that in tonight if there is no problem with that.
Comment 9 Dieter 2005-07-11 14:30:40 UTC
Sounds good!
Do you have an idea why the first selection of browse songs takes so much time
whereas the next selection is much faster?
Comment 10 KDF 2005-07-11 15:01:05 UTC
it takes so long becuase you are finding and sorting a huge number of items.
after that, I suppose there is some level of caching that goes on, same find
key, same results. I wasn't really aware of any caching, but I'm not a db
expert.  I guess you can consider it a bonus that its quicker after the first
time :)
Comment 11 KDF 2005-07-11 18:55:06 UTC
fix commited at change 3671.  update svn or download July 12, nightly.
Comment 12 Chris Owens 2008-03-11 11:28:28 UTC
This bug was marked resolved in Slimserver 6.1, which is several versions ago.  If you're still seeing this bug, please re-open it.  Thanks!