If hostname starts with a at (@) treat as local socket.

Issue #1486
This commit is contained in:
Craig Drummond
2019-05-15 16:47:34 +01:00
committed by Craig Drummond
parent 55de8b7331
commit 4ce3bd72d2
2 changed files with 2 additions and 1 deletions

View File

@@ -32,6 +32,7 @@
ARTIST_IMAGE_SUPPORT sections for removed code.
26. When adding tracks via commandline, only play if queue is currently empty,
otherwise just append new tracks.
27. If hostname starts with a at (@) treat as local socket.
2.3.3
-----

View File

@@ -144,7 +144,7 @@ struct MPDConnectionDetails {
MPDConnectionDetails(const MPDConnectionDetails &o) { *this=o; }
QString getName() const;
QString description() const;
bool isLocal() const { return hostname.startsWith('/'); }
bool isLocal() const { return hostname.startsWith('/') || hostname.startsWith('@'); }
bool isEmpty() const { return hostname.isEmpty() || (!isLocal() && 0==port); }
MPDConnectionDetails & operator=(const MPDConnectionDetails &o);
bool operator==(const MPDConnectionDetails &o) const { return hostname==o.hostname && isLocal()==o.isLocal() && (isLocal() || port==o.port) && password==o.password; }