What is the source of this menu and how can I add an item to it? I have been able to do this for Albums, Tracks, etc. by registering handlers with the AlbumInfo class, etc. but I don't see how to do this for a Favorite? Thanks.
Results 1 to 4 of 4
-
2012-06-18, 13:50 #1Member
- Join Date
- Nov 2006
- Posts
- 81
Context / More Menu for Favorite?
-
2012-06-18, 22:23 #2
I don't know exactly where the code is but I suspect you will find it somewhere inside Slim/Plugin/Favorites/
I don't think there is a designed way to add context menus to favorites, so in worst case you might have to be prepared to patch the server code to accomplish this.
Hopefully Triode or awy will spot this thread, I think they know this part of the code a bit better than me and can probably give you a better answer.
If you are really desperate, it's probably possible to re-implement the standard Favorites menu in your plugin and replace the standard one with one provided by your plugin, in which you add support for context menus, but that could be a lot of work.
Do you need to support all player models or just some of them ?
What about controllers on Android and iOS, is this also something you want to support ?
Can you tell us what you are trying to do in the context menu so we can suggest if there are other ways to do the same thing ?Erland Isaksson (My homepage)
(Developer of many plugins/applets (both free and commercial).
If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)
You may also want to try my Android apps Squeeze Display and RSS Photo Show
Interested in the future of music streaming ? ickStream - A world of music at your fingertips.
-
2012-06-19, 06:13 #3Member
- Join Date
- Nov 2006
- Posts
- 81
Thanks for the reply. I have looked in the Plugin/Favorites source area but can't determine where the menu is generated (it certainly doesn't seem to have a class that derives from Slim::Menu as it does for the rest of the My Music items).
I just want to add a menu item that toggles the shuffle mode on and off which I have created a simple plugin now for the My Music items and works well. This would only make sense for a playlist Favorite, of course. Registering with the "Info" classes seems to work on everything I use (Touch, Radio, SqueezePlay, and iOS) which I would like to maintain with the Favorites as well.
-
2012-06-19, 10:10 #4
The following thread contains some information from when the context menu logic was designed:
http://forums.slimdevices.com/showth...l=1#post423736
As I remember, Slim::Menu::xxxInfo classes would be provided by Logitech in the cases where they wanted to provide some context menu item themselves, in other cases the theory was that it should be possible for a third party plugin to implement a "xxxinfo" CLI command, for example "favoriteinfo" (or possibly "opmlinfo"). I'm not sure if any of this changed when the "onebrowser" (Slim::Menu::BrowseLibrary) initiative was introduced in 7.6. If you look in Slim::Menu::AlbumInfo you will see that it basically registers a "albuminfo" command CLI command and this is called by XMLBrowser (I think) when the user requests to open the context menu. However, I'm not sure if the favorites menus even ask for a context menu as I don't think Logitech provides any context menus on them at the moment.
An alternative is to hook into peterw's ContextMenu plugin, but that only works for Classic, Boom, Transporter (if I remember correctly) and doesn't provide any context menus on Radio/Touch/Controller or any Android/iOS controllers.Erland Isaksson (My homepage)
(Developer of many plugins/applets (both free and commercial).
If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)
You may also want to try my Android apps Squeeze Display and RSS Photo Show
Interested in the future of music streaming ? ickStream - A world of music at your fingertips.

Reply With Quote

