Skip to content

JSON-RPC: Add client method to set instrument #2466

Description

@hoffie

Raised by @softins in #1975 (review)

I must admit I struggle to understand a reason for making skillLevel changeable via the RPC, but not an instrument. I would only ever need to change my skill level if I was also changing my instrument, as my skill level on a given instrument is pretty static!
[...] we need to be able to set the user's instrument. In fact, the complement to jamulusclient/getChannelInfo maybe should be jamulusclient/setChannelInfo for consistency?

Has this feature been discussed and generally agreed?

I assume agreement that a way for setting the instrument should be added.
There's no agreement on the particular implementation yet.

Describe the solution you'd like

  1. Add jamulusclient/setInstrument and keep setName and setSkillLevel
  • 👍 Most fine-grained solution
  • 👍 Saves the API user from having to request and (re)set all existing, unchanged values
  • 👎 Amount of code
  1. Add jamulusclient/setChannelInfo and drop setName and setSkillLevel
  • 👍 Consistent with getChannelInfo
  • 👍 Uses a single protocol message instead of one per change
  • 👎 Requires API users to request the current data first and pre-fill the fields which should not be changed. Maybe we could make the fields optional, though?

I'd go with (2). I read @pljones' #1975 (comment) as also supporting that approach.
Edit: Based on the feedback below, (2) is the generally agreed approach.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions