Bug 5547 - Home menu order needs tweaking
: Home menu order needs tweaking
Status: RESOLVED FIXED
Product: SB Controller
Classification: Unclassified
Component: Browser
: unspecified
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-22 22:02 UTC by Blackketter Dean
Modified: 2007-09-25 08:45 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Blackketter Dean 2007-09-22 22:02:50 UTC
The order of items on the home menu on Jive needs tweaking.  Should be:

Now Playing
My Music
Internet Radio
Music On Demand
Favorites
Extras
Settings
Choose Player (when appropriate)
Turn <playername> Off (when appropriate)
Comment 1 Ben Klaas 2007-09-24 11:30:01 UTC
this has turned out to be far more non-trivial than it looks.

Items on the main menu come from two sources, SS and Jive, and there is no current facility for weighting the items when the sources are merged.

+ = created by Jive SimpleMenu
* = sent from SS and created by SlimBrowser

proposed order:

+Now Playing
*My Music
*Internet Radio
*Music On Demand
*Favorites
+Extras
+Settings
+Choose Player (when appropriate)
*Turn <playername> Off (when appropriate)

To make this really work, there would need to be an optional weight parameter sent over from SS Jive to order menu items, and SlimBrowser would need to have weighting built into its _merge method (taking into account weight from both SS items and Jive items), similar to what SimpleMenu does internally for sorting.

FWIW, the ordering that SimpleMenu does by weight within the Jive-created items is also lost when SlimBrowser does the menu merge.

I'll have to come back to this later. Spent a few hours on it and really got nowhere. My Lua-fu isn't quite up to task for this.
Comment 2 Blackketter Dean 2007-09-24 15:41:32 UTC
Another way to look at it is to have SS choose the order by sending down the full list, with special URLs or some other identifier to hint the browser into inserting its own functions, rather than have the browser mix the two together with some sorting algorithm.
Comment 3 Ben Klaas 2007-09-25 08:45:48 UTC
fixed in Jive r554, SS r13264

added optional weight parameter to any item for sorting by weight.

If no weight, item goes into menu in order of its index in the table.