Bug 8936 - Sort favorites in alarm playlist selection
: Sort favorites in alarm playlist selection
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Player UI
: unspecified
: PC Other
: -- minor (vote)
: 7.x
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-30 12:10 UTC by Mark Miksis
Modified: 2009-07-31 10:26 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Miksis 2008-07-30 12:10:37 UTC
The favorites in the "choose playlist" alarm setup are sorted alphabetically.  IMO, they should be sorted in the same order as they appear under "favorites".
Comment 1 Michael Herger 2008-07-30 16:31:06 UTC
Player or web interface? Both?
Comment 2 Mark Miksis 2008-07-30 16:42:54 UTC
(In reply to comment #1)
> Player or web interface? Both?
> 

Both.
Comment 3 Mark Miksis 2008-07-30 18:18:03 UTC
I should add that I haven't tested this with any favorites folders, but I think the alarm webUI and playerUI should honor both the order and hierarchy of the user's favorites.
Comment 4 Andy Grundman 2008-08-01 09:13:54 UTC
The alarm code uses a hash to build that list, so it gets sorted.
Comment 5 Mark Miksis 2008-08-02 12:17:08 UTC
This also now applies to the SBCUI.
Comment 6 Max Spicer 2008-08-02 13:10:07 UTC
I'm working on this this weekend.  The favourites hierarchy won't get displayed by this being fixed, but I'll be able to make it so that playlists are displayed in the order desired by the caller that registers them.
Comment 7 Max Spicer 2008-08-03 15:18:53 UTC
I've reworked things in change 22330.  This now preserves the sort order for playlists.  The return type for getPlaylists has changed, which will break the new controller ui.  I've made the necessary changes to the web ui.  See docs in Slim::Utils::Alarm::getPlaylists.

This change does not fix this bug yet, as $favsObject->all does not actually return the favourites in the right order.  It currently uses a hash internally and so throws away the order.  I didn't want to change this as I don't know it well enough to understand any implications.  However, I suspect the needed changes are minor, so it would be nice to get this in for 7.2, especially now I've done the hard work...
Comment 8 Adrian Smith 2008-08-03 15:24:26 UTC
Max - I'll look at tomorrow evening, should be simple to keep the favorites order, but it will need to flatten the favorite hierachy - at present I think I recurse depth first does this sound ok?
Comment 9 Adrian Smith 2008-08-03 15:41:45 UTC
or maybe today - favs is updated in change 22332.

The reason for not putting an alarmFavorites function in the favorites code is that I hope the $favs->all method is useful to more functions than just the alarm code.

I note there is still a $favs->all call in SN which returns an array - I'll leave Andy to see whether this needs to be updated for alarms.
Comment 10 Chris Owens 2008-08-04 10:25:36 UTC
Andy thinks this is done in SC, and he needs to do it for SN.
Comment 11 Ben Klaas 2008-08-04 11:20:13 UTC
Controller UI fixed for change in the Alarm::getPlaylist data structure, Boom branch change 22357
Comment 12 Andy Grundman 2008-08-04 11:36:10 UTC
SN fixed in change 22358.
Comment 13 Ben Klaas 2008-09-02 12:50:17 UTC
looks like a bunch of fixed 7.2 bugs were erroneously changed to target milestone of '---'. Changing them back, as they should appear in searches as to where they were fixed.
Comment 14 Ross Levine 2008-10-13 18:07:11 UTC
Verified to be fixed in 7.2.1 - 23472, r3080. 
Comment 15 James Richardson 2008-12-15 12:34:31 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 16 Chris Owens 2009-07-31 10:26:10 UTC
Reduce number of active targets for SC