-
Notifications
You must be signed in to change notification settings - Fork 240
New API calls in JSON-RPC for getting server categories #3649
Description
What is the current behaviour and why should it be changed?
-
Not finding an API call in the JSON-RPC doc for getting the list of server categories. While it's possible I'm just blind, I hope that's not the case
-
Not finding a call to retrieve the currently selected server, if there is one
-
It's brittle to have to supply the default categories, with the known ids for calling jamulusclient/pollServerList
-
It's impossible to know all the categories if somebody's created custom ones
-
It makes it much more wonky to select which server you really want if there's duplicates between categories (which there are btw) - the category becomes part the primary key along with the server name. Note: The end goal is to get the ping time for that selected server
-
There's no knowledge that I could find on how to map the displayed category in the UI to the backing category id suitable for passing into pollServerList. For example, apparently 'genrerock' is not the id to the category name "Genre Rock" (I got an error when I tried that)
ps: If I can query the currently selected server, I can avoid looking for it at my end - the information has to be certainly available. Or if the currently selected server becomes a notification.
Describe possible approaches
A new API call, jamulusclient/pollServerCategorie - no parameters. It returns an object consisting of the displayed category and the category id suitable for passing into pollServerList
A new API call, jamulusclient/pollCurrentConnectedServer - no parameters. It returns the same values as serverInfoReceived for the currently connected server, or whatever 'null' is defined in general (empty object, 'undefined', whatever). Another approach is to add notification jamulusclient/curentServerInfoReceived with the same return as serverInfoReceived for the current connected server (avoids having to define 'null')
Has this feature been discussed and generally agreed?
I have no idea - I'm a newbie here.