If HTTP streaming enabled, then use this is in preference to direct

access
This commit is contained in:
Craig Drummond
2017-10-15 18:16:56 +01:00
committed by Craig Drummond
parent 4384409011
commit 38f82ee006

View File

@@ -104,10 +104,10 @@ static QStringList parseUrls(const QStringList &urls, bool percentEncoded)
if (QLatin1String("http")==u.scheme()) {
useable.append(u.toString());
} else if ((u.scheme().isEmpty() || QLatin1String("file")==u.scheme()) && checkExtension(u.path())) {
if (MPDConnection::self()->localFilePlaybackSupported() && !u.path().startsWith(QLatin1String("/media/"))) {
useable.append(QLatin1String("file://")+u.path());
} else if (HttpServer::self()->isAlive()) {
if (HttpServer::self()->isAlive()) {
useable.append(HttpServer::self()->encodeUrl(u.path()));
} else if (MPDConnection::self()->localFilePlaybackSupported() && !u.path().startsWith(QLatin1String("/media/"))) {
useable.append(QLatin1String("file://")+u.path());
}
}
}