Merge pull request #795 from HiassofT/kodi-18-onavstarted

Fix XBMCVideoChecker for Kodi 18
This commit is contained in:
Rick164 2018-11-09 01:23:18 +01:00 committed by GitHub
commit fb84ee0309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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());