gmusicbrowser Forum

Main board => Questions => Topic started by: mbmccurdy on July 19, 2013, 13:14:42

Title: Maintain sort when searching
Post by: mbmccurdy on July 19, 2013, 13:14:42
Hallo!

I have my playlist sorted by artist, then album, then track id. However, when I search within it, the results are not returned sorted in this way. Even if I sort again, then clear the search, the sorting is gone. Can this be fixed?

Cheers,

Micah
Title: Re: Maintain sort when searching
Post by: Quentin Sculo on September 27, 2013, 21:49:29
Sorry for not replying sooner.
If you are still interested you need to tell me which layout you are using, most often the song list widget use a different sort order from the playlist, you can choose the sort order of the song list widget by right clicking on its column headers.
Title: Re: Maintain sort when searching
Post by: mbmccurdy on September 30, 2013, 13:31:16
Hallo!

No worries about a slow reply -- it's a free forum for a free program, after all. =)

I'm using the exaile layout, so I don't see a "song list widget", just a playlist. It seems like it would be simple enough to change the sorting algorithms used to be stable---many of the fastest sort algorithms are stable. It's possible that I might be able to do this myself, but I've never looked at the gmusicbrowser source, so I'm not sure how easy it would be.
Title: Re: Maintain sort when searching
Post by: Quentin Sculo on October 04, 2013, 19:54:30
This is not a sorting algorithm problem.
I've tried a bit with the exaile layout, but I don't see what you mean. Could you maybe make a few screenshots showing what you are doing ?
Title: Re: Maintain sort when searching
Post by: mbmccurdy on October 11, 2013, 14:34:47
Hallo!

Thanks for helping me out with this. So, I have my window sorted by artist, then by album, then by track #. All is well with the world. This is shown in screen1.png. Then, I decide that I want to restrict the playlist to only Portishead. So, I type "Portishead" in the search box in the lower right, and click enter. Now, the playlist restricts properly to only the Portishead songs, but the order is no longer what it was! This is shown in screen2.png.

Also, if I resort the restricted playlist in some way, when I click "x" next to the search box, to to back to the unrestricted playlist, the unrestricted playlist is also no longer sorted.
Title: Re: Maintain sort when searching
Post by: mbmccurdy on January 28, 2014, 01:35:26
Do these screenshots help to explain my issue? Can I help in some other way? Whatever needs to be done, I would happily code it myself.

Micah
Title: Re: Maintain sort when searching
Post by: Quentin Sculo on January 31, 2014, 23:26:25
Very sorry for taking so long to reply :(

I think I understand the problem, you are sorting by artist, then by album, then by track #, by clicking on the columns in order (track, then album, then artist) right ? That is not how you should do with gmb.
In gmb you can set the order via the sort menu, for the playlist you can find it for example by clicking on the icon just above the "previous" button. For lists you can find this menu by right-clicking on the column headers.
In this menu you can choose one of the saved orders, or choose custom, which takes you to a dialog where you can create a custom order and/or edit the saved orders.

I think this is a much better way to select a sort order. For example I usually keep my list sorted with : artist album disc track filename (filename so that if the track number is in the filename but not in tag, it still sort by track), clicking on 5 columns just to get that would be very annoying...

The reason the order is changed when you filter the list is because it always starts with the unsorted library, and then apply the selected sort order.
Title: Re: Maintain sort when searching
Post by: mbmccurdy on February 03, 2014, 13:33:35
Hallo!

I was indeed sorting by clicking on column headers, and the tedium thereof is what prompted me to first ask a question on the board. Your solution (setting the global sort order) works beautifully and I  am already most pleased. Thanks for your reply.