diff --git a/kodi/devicepluginkodi.cpp b/kodi/devicepluginkodi.cpp index 5f525369..c519a525 100644 --- a/kodi/devicepluginkodi.cpp +++ b/kodi/devicepluginkodi.cpp @@ -313,9 +313,9 @@ void DevicePluginKodi::onPlaybackStatusChanged(const QString &playbackStatus) Device *device = m_kodis.value(kodi); device->setStateValue(kodiPlaybackStatusStateTypeId, playbackStatus); // legacy events - if (playbackStatus == "PLAYING") { + if (playbackStatus == "Playing") { emit emitEvent(Event(kodiOnPlayerPlayEventTypeId, device->id())); - } else if (playbackStatus == "PAUSED") { + } else if (playbackStatus == "Paused") { emit emitEvent(Event(kodiOnPlayerPauseEventTypeId, device->id())); } else { emit emitEvent(Event(kodiOnPlayerStopEventTypeId, device->id())); diff --git a/kodi/kodi.cpp b/kodi/kodi.cpp index 187594c8..514c1073 100644 --- a/kodi/kodi.cpp +++ b/kodi/kodi.cpp @@ -205,7 +205,7 @@ void Kodi::activePlayersChanged(const QVariantList &data) qCDebug(dcKodi()) << "active players changed" << data.count(); m_activePlayerCount = data.count(); if (m_activePlayerCount == 0) { - emit playbackStatusChanged("STOPPED"); + emit playbackStatusChanged("Stopped"); return; } int activePlayer = data.first().toMap().value("playerid").toInt(); @@ -222,9 +222,9 @@ void Kodi::playerPropertiesReceived(const QVariantMap &properties) qCDebug(dcKodi()) << "player props received" << properties; if (m_activePlayerCount > 0) { if (properties.value("speed").toDouble() > 0) { - emit playbackStatusChanged("PLAYING"); + emit playbackStatusChanged("Playing"); } else { - emit playbackStatusChanged("PAUSED"); + emit playbackStatusChanged("Paused"); } } } diff --git a/kodi/kodijsonhandler.cpp b/kodi/kodijsonhandler.cpp index 74e7080d..a510fdb1 100644 --- a/kodi/kodijsonhandler.cpp +++ b/kodi/kodijsonhandler.cpp @@ -56,12 +56,12 @@ void KodiJsonHandler::processNotification(const QString &method, const QVariantM if (method == "Application.OnVolumeChanged") { QVariantMap data = params.value("data").toMap(); emit volumeChanged(data.value("volume").toInt(), data.value("muted").toBool()); - } else if (method == "Player.OnPlay") { - emit playbackStatusChanged("PLAYING"); + } else if (method == "Player.OnPlay" || method == "Player.OnResume") { + emit playbackStatusChanged("Playing"); } else if (method == "Player.OnPause") { - emit playbackStatusChanged("PAUSED"); + emit playbackStatusChanged("Paused"); } else if (method == "Player.OnStop") { - emit playbackStatusChanged("STOPPED"); + emit playbackStatusChanged("Stopped"); } }