XBMCVideoChecker: use OnAVStart event for Kodi 18

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2018-06-08 17:19:35 +02:00
parent dc6a602503
commit ad9de520ad
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ void XBMCVideoChecker::receiveReply()
// silence - no "debug" code should be at the log
// std::cout << "KODICHECK INFO: Kodi Message: " << reply.toStdString() << std::endl;
if (reply.contains("\"method\":\"Player.OnPlay\""))
if ( (_xbmcVersion < 18 && reply.contains("\"method\":\"Player.OnPlay\"")) ||
(_xbmcVersion >= 18 && reply.contains("\"method\":\"Player.OnAVStart\"")) )
{
// send a request for the current player state
_socket.write(_activePlayerRequest.toUtf8());