mirror of
https://github.com/nymea/nymea-plugins.git
synced 2026-07-18 00:43:48 +02:00
Fix kodi plugin not reconnecting properly
This commit is contained in:
parent
be230d9a3b
commit
df76a84afe
@ -357,9 +357,18 @@ void DevicePluginKodi::onConnectionChanged(bool connected)
|
||||
}
|
||||
}
|
||||
|
||||
kodi->showNotification("nymea", tr("Connected"), 2000, "info");
|
||||
|
||||
device->setStateValue(kodiConnectedStateTypeId, kodi->connected());
|
||||
|
||||
if (connected) {
|
||||
kodi->showNotification("nymea", tr("Connected"), 2000, "info");
|
||||
} else {
|
||||
if (!info) {
|
||||
// This isn't a setup, we've been reconnected before, so try reconnecting in 5 secs
|
||||
QTimer::singleShot(5000, kodi, [kodi](){
|
||||
kodi->connectKodi();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DevicePluginKodi::onStateChanged()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user