diff --git a/libsrc/xbmcvideochecker/XBMCVideoChecker.cpp b/libsrc/xbmcvideochecker/XBMCVideoChecker.cpp index 117fd46c..5c8718bc 100644 --- a/libsrc/xbmcvideochecker/XBMCVideoChecker.cpp +++ b/libsrc/xbmcvideochecker/XBMCVideoChecker.cpp @@ -7,7 +7,7 @@ XBMCVideoChecker::XBMCVideoChecker(const std::string & address, uint16_t port, u QObject(), _address(QString::fromStdString(address)), _port(port), - _request("{\"jsonrpc\":\"2.0\",\"method\":\"Player.GetActivePlayers\",\"id\":1}"), + _request("{\"jsonrpc\":\"2.0\",\"method\":\"Player.GetActivePlayers\",\"id\":666}"), _timer(), _socket(), _grabVideo(grabVideo), @@ -54,6 +54,15 @@ void XBMCVideoChecker::receiveReply() // expect that the reply is received as a single message. Probably oke considering the size of the expected reply QString reply(_socket.readAll()); + std::cout << reply.toStdString() << std::endl; + + // check if the resply is a reply to one of my requests + if (!reply.contains("\"id\":666")) + { + // probably not. Leave this mreply as is and don't act on it + return; + } + GrabbingMode newMode = GRABBINGMODE_INVALID; if (reply.contains("video")) {