Announcement

Collapse
No announcement yet.

Context / More Menu for Favorite?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Context / More Menu for Favorite?

    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.

    #2
    Originally posted by cncb View Post
    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.
    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 Lindmark (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

    Comment


      #3
      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.

      Comment


        #4
        The following thread contains some information from when the context menu logic was designed:


        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 Lindmark (My homepage)
        Developer of many plugins/applets
        Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

        Comment

        Working...
        X