This commit is contained in:
redPanther 2016-08-10 06:54:20 +02:00 committed by GitHub
parent 0ef0530861
commit d68071cda3

View File

@ -146,8 +146,15 @@ void KODIVideoChecker::receiveReply()
emit videoMode(VIDEO_2D);
QString type = resultArray[0].toObject()["type"].toString();
int prevCurrentPlayerID = _currentPlayerID;
_currentPlayerID = resultArray[0].toObject()["playerid"].toInt();
// set initial player state
if (prevCurrentPlayerID == 0 && _currentPlayerID != 0)
{
_socket.write(_getCurrentPlaybackState.arg(_currentPlayerID).toUtf8());
return;
}
if (type == "video")
{
if (_currentPlaybackState)
@ -360,8 +367,6 @@ void KODIVideoChecker::connected()
// send a request for the current player state
_socket.write(_activePlayerRequest.toUtf8());
_socket.write(_checkScreensaverRequest.toUtf8());
if (_currentPlayerID != 0)
_socket.write(_getCurrentPlaybackState.arg(_currentPlayerID).toUtf8());
}
void KODIVideoChecker::disconnected()