mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 07:36:41 +02:00
Return the streams response to "SetProperty"
This commit is contained in:
parent
640b05db7d
commit
4c2636f358
3 changed files with 16 additions and 17 deletions
|
@ -483,14 +483,14 @@ void Server::processRequest(const jsonrpcpp::request_ptr request, const OnRespon
|
|||
if (stream == nullptr)
|
||||
throw jsonrpcpp::InternalErrorException("Stream not found", request->id());
|
||||
|
||||
stream->setProperty(*request, [](const jsonrpcpp::Response& response) {
|
||||
LOG(INFO, LOG_TAG) << "Received response for Stream.SetProperty, id: " << response.id() << ", result: " << response.result()
|
||||
<< ", error: " << response.error().code() << "\n";
|
||||
stream->setProperty(*request, [request, on_response](const jsonrpcpp::Response& props_response) {
|
||||
LOG(INFO, LOG_TAG) << "Received response for Stream.SetProperty, id: " << props_response.id() << ", result: " << props_response.result()
|
||||
<< ", error: " << props_response.error().code() << "\n";
|
||||
auto response = make_shared<jsonrpcpp::Response>(request->id(), props_response.result());
|
||||
on_response(response, nullptr);
|
||||
});
|
||||
|
||||
// Setup response
|
||||
// TODO: error handling
|
||||
result["id"] = streamId;
|
||||
return;
|
||||
}
|
||||
else if (request->method() == "Stream.AddStream")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue