Merge PR #216: Kodi: Skip link-local IPv6 addresses
commit
0a15fa141b
|
|
@ -87,6 +87,10 @@ void DevicePluginKodi::setupDevice(DeviceSetupInfo *info)
|
||||||
|
|
||||||
if (!kodiUuid.isNull()) {
|
if (!kodiUuid.isNull()) {
|
||||||
foreach (const ZeroConfServiceEntry &entry, m_serviceBrowser->serviceEntries()) {
|
foreach (const ZeroConfServiceEntry &entry, m_serviceBrowser->serviceEntries()) {
|
||||||
|
if (entry.hostAddress().protocol() == QAbstractSocket::IPv6Protocol && entry.hostAddress().toString().startsWith("fe80")) {
|
||||||
|
// We don't support link-local ipv6 addresses yet. skip those entries
|
||||||
|
continue;
|
||||||
|
}
|
||||||
QString uuid;
|
QString uuid;
|
||||||
foreach (const QString &txt, entry.txt()) {
|
foreach (const QString &txt, entry.txt()) {
|
||||||
if (txt.startsWith("uuid")) {
|
if (txt.startsWith("uuid")) {
|
||||||
|
|
@ -125,6 +129,7 @@ void DevicePluginKodi::setupDevice(DeviceSetupInfo *info)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qCDebug(dcKodi()).nospace().noquote() << "Connecting to kodi on " << ipString << ":" << port << " (HTTP Port " << httpPort << ")";
|
||||||
Kodi *kodi= new Kodi(QHostAddress(ipString), port, httpPort, this);
|
Kodi *kodi= new Kodi(QHostAddress(ipString), port, httpPort, this);
|
||||||
|
|
||||||
connect(kodi, &Kodi::connectionStatusChanged, this, &DevicePluginKodi::onConnectionChanged);
|
connect(kodi, &Kodi::connectionStatusChanged, this, &DevicePluginKodi::onConnectionChanged);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue