ITADN

New API calls in JSON-RPC for getting server categories

#3649Opendigable1 创建于 2026-04-08
feature request
D
digable1commented
**What is the current behaviour and why should it be changed?** 1. 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 2. Not finding a call to retrieve the currently selected server, if there is one <!-- Please give a precise description of the status quo and why this is not optimal. --> 1. It's brittle to have to supply the default categories, with the known ids for calling jamulusclient/pollServerList 2. It's impossible to know all the categories if somebody's created custom ones 3. 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 4. 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** <!-- List possible approaches with pros and cons, reference any relevant discussion threads if possible, and consider tagging the main participants. Please note the contribution guidelines (https://github.com/jamulussoftware/jamulus/blob/main/CONTRIBUTING.md), especially the part about "keeping it simple and stupid". --> <!-- Describe the solution you'd like --> 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. <!-- Don't worry about requesting something that hasn't been discussed - we'll just move it to Discussion if we think it's unclear. But ideally, issues should have an agreed, clear specification such that anyone could action it without much help. -->
11 条评论