mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-09 23:26:47 +02:00
Client.SetVolume expects "volume" json object
This commit is contained in:
parent
37ccdb92fb
commit
a133c60661
5 changed files with 19 additions and 43 deletions
|
@ -155,13 +155,8 @@ void StreamServer::onMessageReceived(ControlSession* controlSession, const std::
|
|||
}
|
||||
else if (request.method == "Client.SetVolume")
|
||||
{
|
||||
clientInfo->config.volume.percent = request.getParam<uint16_t>("volume", 0, 100);
|
||||
response = clientInfo->config.volume.percent;
|
||||
}
|
||||
else if (request.method == "Client.SetMute")
|
||||
{
|
||||
clientInfo->config.volume.muted = request.getParam<bool>("mute", false, true);
|
||||
response = clientInfo->config.volume.muted;
|
||||
clientInfo->config.volume.fromJson(request.getParam("volume"));
|
||||
response = clientInfo->config.volume.toJson();
|
||||
}
|
||||
else if (request.method == "Group.SetStream")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue