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.
Results 1 to 9 of 9
-
2019-09-21, 02:15 #1
- Join Date
- Mar 2017
- Posts
- 1,124
Configuring player's browse modes?
-
2019-09-21, 02:23 #2
- Join Date
- Jan 2010
- Location
- Hertfordshire
- Posts
- 3,197
-
2019-09-21, 02:27 #3
- Join Date
- Mar 2017
- Posts
- 1,124
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.
-
2019-09-21, 02:41 #4
- Join Date
- Jan 2010
- Location
- Hertfordshire
- Posts
- 3,197
-
2019-09-21, 03:35 #5
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" }, { ... } ] } }
Code:{ "params": [ "00:04:20:...", [ "playerpref", "disabled_myMusicAlbumsVariousArtists", "?" ] ], "result": { "_p2": "0" }, "id": 0, "method": "slim.request" }
Last edited by mherger; 2019-09-21 at 03:38.
-
2019-09-21, 04:06 #6
- Join Date
- Mar 2017
- Posts
- 1,124
-
2019-09-21, 08:06 #7
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
-
2019-09-21, 22:58 #8
- Join Date
- Mar 2017
- Posts
- 1,124
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.
-
2019-09-22, 21:40 #9
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