Client.SetVolume expects "volume" json object

This commit is contained in:
badaix 2016-12-26 15:58:27 +01:00
parent 37ccdb92fb
commit a133c60661
5 changed files with 19 additions and 43 deletions

View file

@ -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")
{