Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Mar 2017
    Posts
    1,124

    Configuring player's browse modes?

    One of the main (for me at least) missing features in Material is a way to configure the browse-modes available for a player. There is no JSON API for this, and looking at the server.prefs file I see lots of _ts_disabled_myMusic** entries. Is there a way (via CLI calls, or perl code) to obtain the list of available browse modes, and which ones are enabled? For now at least, I'm not interested in creating new ones - just being able to list all of the existing ones (enabled or not), and to be able to control which ones are enabled for a player.

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    3,192
    Quote Originally Posted by cpd73 View Post
    One of the main (for me at least) missing features in Material is a way to configure the browse-modes available for a player. There is no JSON API for this, and looking at the server.prefs file I see lots of _ts_disabled_myMusic** entries. Is there a way (via CLI calls, or perl code) to obtain the list of available browse modes, and which ones are enabled? For now at least, I'm not interested in creating new ones - just being able to list all of the existing ones (enabled or not), and to be able to control which ones are enabled for a player.
    Maybe I don't understand the issue but isn't this available under server settings/player.

    Sent from my SM-G900F using Tapatalk

  3. #3
    Senior Member
    Join Date
    Mar 2017
    Posts
    1,124
    Quote Originally Posted by slartibartfast View Post
    Maybe I don't understand the issue but isn't this available under server settings/player.
    Yeah, I know I can use the default webUI - I'd just like to add the option to enable/disable modes from within Material's players settings dialog. I also want to be able to set the browse modes for group players created via material - so that (by default) they get all the modes of the associated players.

  4. #4
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    3,192
    Quote Originally Posted by cpd73 View Post
    Yeah, I know I can use the default webUI - I'd just like to add the option to enable/disable modes from within Material's players settings dialog. I also want to be able to set the browse modes for group players created via material - so that (by default) they get all the modes of the associated players.
    I see your point now. If you create a group it automatically includes all available browse modes which isn't ideal.

    Sent from my SM-G900F using Tapatalk

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,324
    There are the "pref" and the "playerpref" queries. Get the list of menu items using "pref plugin.extendedbrowsemodes:additionalMenuItems".

    Code:
    {
        "method": "slim.request",
        "params": [
            "",
            [
                "pref",
                "plugin.extendedbrowsemodes:additionalMenuItems",
                "?"
            ]
        ],
        "id": 0,
        "result": {
            "_p2": [
                {
                    "id": "myMusicArtistsComposers",
                    "params": {
                        "role_id": "COMPOSER"
                    },
                    "weight": "12",
                    "name": "Komponisten",
                    "feed": "artists"
                },
                {
                   ...
                }
            ]
        }
    }
    Once you got that list you can check whether an item as been disabled by using ".... playerpref disabled_{menu ID}", eg.:

    Code:
    {
        "params": [
            "00:04:20:...",
            [
                "playerpref",
                "disabled_myMusicAlbumsVariousArtists",
                "?"
            ]
        ],
        "result": {
            "_p2": "0"
        },
        "id": 0,
        "method": "slim.request"
    }
    Replacing the question mark with 0/1 would enable/disable the item.
    Last edited by mherger; 2019-09-21 at 03:38.
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

  6. #6
    Senior Member
    Join Date
    Mar 2017
    Posts
    1,124
    Quote Originally Posted by mherger View Post
    There are the "pref" and the "playerpref" queries. Get the list of menu items using "pref plugin.extendedbrowsemodes:additionalMenuItems".
    Thanks. That just returns the additional items though, not the others. i guess the others I can just hard-code the names for? Anyway, this should be enough for me to implement the feature.

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,324

    Configuring player's browse modes?

    > Thanks. That just returns the additional items though, not the others. i
    > guess the others I can just hard-code the names for?


    Aah, true!
    --

    Michael

  8. #8
    Senior Member
    Join Date
    Mar 2017
    Posts
    1,124
    Quote Originally Posted by mherger View Post
    > Thanks. That just returns the additional items though, not the others. i
    > guess the others I can just hard-code the names for?


    Aah, true!
    --

    Michael
    Thanks, as always, for your help. I've implemented configuration of the modes in the 1.1 branch. I had to hard-code the standard browse modes, and the non-configurable modes from extended-browse-modes. Don't really like the hard-coding, but not sure how to do otherwise. The bulk of the code is in the perl side, with a simple CLI API added for the javascript to call. Custom Browse modes aren't listed, but they aren't in the default webUI, and I don't use these.

    For any groups created, or edited, by Material, I set the group player's browse modes to all the enabled modes from all members.

  9. #9
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,324

    Configuring player's browse modes?

    > Thanks, as always, for your help. I've implemented configuration of the
    > modes in the 1.1 branch. I had to hard-code the standard browse modes,
    > and the non-configurable modes from extended-browse-modes. Don't really
    > like the hard-coding, but not sure how to do otherwise.


    I felt the same when I implemented the Controller app a few years ago...
    but it's what it is.

    --

    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •