- Fix mDNS on Windows.
- Unique name for mDNS broadcast (hostname and domain added). - Add link to Google Play Store for the Android app.
This commit is contained in:
parent
a87db564e3
commit
39bce9ba96
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <QDataStream>
|
||||
#include <QSettings>
|
||||
#include <QHostInfo>
|
||||
|
||||
const char* NetworkRemote::kSettingsGroup = "NetworkRemote";
|
||||
const quint16 NetworkRemote::kDefaultServerPort = 5500;
|
||||
|
@ -91,8 +92,10 @@ void NetworkRemote::StartServer() {
|
|||
qLog(Info) << "Listening on port " << port_;
|
||||
|
||||
if (Zeroconf::GetZeroconf()) {
|
||||
QString name = QString("Clementine on %1 (%2)").arg(QHostInfo::localHostName())
|
||||
.arg(QHostInfo::localDomainName());
|
||||
Zeroconf::GetZeroconf()->Publish(
|
||||
"local", "_clementine._tcp", "Clementine", port_);
|
||||
"local", "_clementine._tcp", name, port_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ uint32_t GetLocalIPAddress() {
|
|||
// TODO: Add ipv6 support to tinysvcmdns.
|
||||
if (address.protocol() == QAbstractSocket::IPv4Protocol &&
|
||||
!address.isInSubnet(QHostAddress::parseSubnet("127.0.0.1/8"))) {
|
||||
qLog(Debug) << "Selected IP:" << address.toString();
|
||||
return address.toIPv4Address();
|
||||
}
|
||||
qLog(Debug) << "IP Ignored:" << address.toString();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -56,6 +54,14 @@ void TinySVCMDNS::Publish(
|
|||
if (!mdnsd_) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Some pointless text, so tinymDNS publishs the service
|
||||
// corretly
|
||||
const char *txt[] = {
|
||||
"cat=nyan",
|
||||
NULL
|
||||
};
|
||||
|
||||
mdnsd_register_svc(
|
||||
mdnsd_,
|
||||
name.toUtf8().constData(),
|
||||
|
|
|
@ -123,11 +123,20 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Get the Android App now!</string>
|
||||
<string><a href="https://play.google.com/store/apps/details?id=de.qspool.clementineremote">Get the Android App now!</a></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
Loading…
Reference in New Issue