Fix compile error
This commit is contained in:
@@ -74,7 +74,7 @@ QUrl SubsonicBaseRequest::CreateUrl(const QString &ressource_name, const QList<P
|
|||||||
|
|
||||||
QUrl url(server_url());
|
QUrl url(server_url());
|
||||||
|
|
||||||
if (url.path().right(1) == '/') {
|
if (!url.path().isEmpty() && url.path().right(1) == "/") {
|
||||||
url.setPath(url.path() + QString("rest/") + ressource_name);
|
url.setPath(url.path() + QString("rest/") + ressource_name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ void SubsonicService::SendPing(QUrl url, const QString &username, const QString
|
|||||||
url_query.addQueryItem(encoded_param.first, encoded_param.second);
|
url_query.addQueryItem(encoded_param.first, encoded_param.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url.path().right(1) == '/') {
|
if (!url.path().isEmpty() && url.path().right(1) == "/") {
|
||||||
url.setPath(url.path() + QString("rest/ping.view"));
|
url.setPath(url.path() + QString("rest/ping.view"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ UrlHandler::LoadResult SubsonicUrlHandler::StartLoading(const QUrl &url) {
|
|||||||
|
|
||||||
QUrl media_url(server_url());
|
QUrl media_url(server_url());
|
||||||
|
|
||||||
if (media_url.path().right(1) == '/') {
|
if (!media_url.path().isEmpty() && media_url.path().right(1) == "/") {
|
||||||
media_url.setPath(media_url.path() + QString("rest/stream"));
|
media_url.setPath(media_url.path() + QString("rest/stream"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user