PDA

View Full Version : Customization of Jive browse menus ?



erland
2007-10-23, 20:31
I've just started to look at how to add/modify menus on the Jive remote by interacting with Slim::Control::Jive.

If I understand this correctly the Jive remote will issue a "menu" CLI command which results in that the Slim::Control::Jive::menuQuery method is called which returns the menu structure.

Some questions regarding this:

1.
It currently seems to always return all the standard browse menus and there is no way to hide for example the "My Music/Albums" menu if you don't like that. Would a patch that makes it possible for a plugin to override or disable the standard browse menus be accepted ?
I'm thinking something similar to the player interface where Slim::Buttons::BrowseDB calls Slim::Buttons::Home::addSubMenu but it is possible for a plugin to also call the Slim::Buttons::Home::delSubMenu to remove a standard browse menu or Slim::Buttons::Home::addSubMenu to replace an existing browse menu.

2.
If I'm interpreting the code in Slim::Control::Jive correctly the menus on the Jive remote will look exactly the same independent on which player the Jive remote is connected to.
Is the "menu" CLI command called from the Jive remote everytime you select a new player on the remote or is it just called once and then cached ?
The reason for the question is that I'm thinking that it would be good to make it possible to provide menus that only are visible on specific players. For example a simplified menu when connecting to the SB in the kids room and the full advanced menu when connecting the the SB in the living room.
Assuming that the "menu" CLI command is executed everytime you connect to a new player, would a patch that made it possible to have player specific menus be accepted ?

I'm aware of that any patch might have to go through a more detailed investigations, at the moment I'm just interesting to know if it's worth spending time at all implementing a patch for the above mentioned functionality or if it will be discarded directly due to some design decsion.

Any thought regarding if and how these things should be implemented is greatly appreciated.

bklaas
2007-10-24, 08:21
hi Erland-

You are correct in how Jive requests the main menu from SC, and how Slim::Control::Jive::menuQuery handles it. Currently there is only a facility for plugins to register menu items to one of three sub menus: My Music, Extras, and Settings.

Customization of the main home menu, including adding *and* removing items, will happen but it's not implemented yet. What is your vision for this? Would it be configured from the Web UI, much like PlayerSettings->Menus currently works for SqueezeBox, or from the Jive HW through an applet? Or both?

I think player-specific custom menus is an interesting idea. I certainly think it's a viable patch idea.

cheers,
#!/ben

erland
2007-10-24, 09:26
Customization of the main home menu, including adding *and* removing items, will happen but it's not implemented yet. What is your vision for this?


The primary vision is that I like to be able to replace the existing browse menus under My Music with the ones that will be implemented by the Custom Browse plugin. The reason is just that Custom Browse gives you a bit more flexibility and customization options compared to the standard menus.



Would it be configured from the Web UI, much like PlayerSettings->Menus currently works for SqueezeBox, or from the Jive HW through an applet? Or both?

The easiest way to implement it would work for me. I would even be satisfied if I could only do it through an API in the first release.
If we like to build a user interface for the menu configuration already in the first release, I think something similar to the current menu configuration for the SqueezeBox would be good enough.

There has been some discussions earlier regarding improvements of the menu configuration on the SqueezeBox and I think the idea then was to do something similar to the opml menu configuration available in the MyPicks OPML editor.

In my opinion the focus should be to make the menu configuration as simple as possible from a developer point of view, there are other things that are a lot more important to focus on. Configuring the menus is typically something you do once in the beginning and then never touch again.

bklaas
2007-10-24, 20:49
checkin r14076 has the first attempt at a solution for this at the developer-level.

You can now delete menu items from 'main', 'mymusic', 'settings', and 'extras' via a Plugin like so:

Slim::Control::Jive::deleteMenuItem($text, $menu);

where $text is an exact match of what's configured for an item in Slim::Control::Jive and $menu is the menu you want to change (as specified above)

for example, to remove the Music on Demand item on the Main Menu from a Plugin
Slim::Control::Jive::deleteMenuItem(Slim::Utils::S trings::string('MUSIC_ON_DEMAND'), 'main');

that item can be replaced through the already existing Slim::Control::Jive::registerPluginMenu.

It is not possible to remove a Plugin-created menu item, nor is it possible to remove a menu item that's also created natively in Jive (e.g., Extras or Settings), though deleteMenuItem will get rid of everything served to those menus via SC.

hope that helps, and feedback welcome,
#!/ben

erland
2007-10-24, 21:52
checkin r14076 has the first attempt at a solution for this at the developer-level.

...

that item can be replaced through the already existing Slim::Control::Jive::registerPluginMenu.

It is not possible to remove a Plugin-created menu item, nor is it possible to remove a menu item that's also created natively in Jive (e.g., Extras or Settings), though deleteMenuItem will get rid of everything served to those menus via SC.

hope that helps, and feedback welcome,
#!/ben

I think this should work, I'll know for sure when I've implemented some logic for this in Custom Browse.

Another thing that is a bit related. I've always missed the possibility for a plugin to add its own sub menus in the track details menu shown when moving right from a track.

As an example, when you have the Custom Scan plugin installed you can get custom tag information such as PERFORMER or MOOD into the Squeeze Center database. I can add a main menu under My Music that browses "Performers" or "Moods", but I don't think I can do the same in the track details menu to be able to browse tracks with the same Moods/Performers as the currently selected track. In SlimServer 6.5 I choosed to override the whole track details menu for the SqueezeBox and web interface due to this limitation, however I really just want to add new items without re-implementing all the track details menu logic already available in SqueezeCenter. For the Jive interface is thing track details is implemented by the "songinfo" CLI command, but I'm not completely sure.

I'm not sure if there is an easy way to implement this as I haven't look through the SqueezeCenter code in detail, but if there is, it would be great to also have a registerTrackDetailsPluginMenu that makes it possible for a plugin to add a track details sub menu in the Jive interface.

I understand that this might be a lot of work and it might also be inconsistent if this possibility exists for the Jive interface but not for the SqueezeBox and web interface. For me it would be good enough if it was supported in the Jive interface, but I can understand that if you like to keep consistent functionality between all interfaces it might be a bad idea to just do it for Jive.
So if you don't like the idea or your feeling is that it would be too much work/risk to get this into SC7, just say so.

bklaas
2007-10-25, 07:23
What you are looking for with the custom songinfo output could be done, but it's reasonably involved and out of scope with what I'm working on now. My suggestion is to fully build support for customizing songinfo CLI in SC without worrying about Jive. Adding the jive support won't be that hard once the other parts are in place.

FYI, r14093 added the ability to add/remove to the search menu (a submenu of mymusic) in addition to the others.

cheers,
#!/ben