diff --git a/http/httpserver.cpp b/http/httpserver.cpp index b21015269..e6faf557f 100644 --- a/http/httpserver.cpp +++ b/http/httpserver.cpp @@ -24,6 +24,7 @@ #include "httpserver.h" #include "httpsocket.h" #include "utils.h" +#include "tags.h" #include #include #ifdef ENABLE_KDE_SUPPORT @@ -149,13 +150,9 @@ QByteArray HttpServer::encodeUrl(const Song &s) const QByteArray HttpServer::encodeUrl(const QString &file) const { - QUrl url; - url.setScheme("http"); - url.setHost("127.0.0.1"); - url.setPort(socket->port()); - url.setPath(file); - url.addQueryItem("cantata", "file"); - return url.toEncoded(); + Song s=Tags::read(file); + s.fillEmptyFields(); + return encodeUrl(s); } Song HttpServer::decodeUrl(const QString &url) const @@ -198,16 +195,3 @@ Song HttpServer::decodeUrl(const QString &url) const return s; } - -QString HttpServer::decodeFileUrl(const QString &file) const -{ - if (isAlive()) { - QUrl u(file); - - if (u.hasQueryItem("cantata") && u.queryItemValue("cantata")=="file") { - return u.path(); - } - } - - return QString(); -} diff --git a/http/httpserver.h b/http/httpserver.h index 7b19a55a1..1b598e5bb 100644 --- a/http/httpserver.h +++ b/http/httpserver.h @@ -52,7 +52,6 @@ public: QByteArray encodeUrl(const Song &s) const; QByteArray encodeUrl(const QString &file) const; Song decodeUrl(const QString &url) const; - QString decodeFileUrl(const QString &file) const; private: QThread *thread; diff --git a/widgets/playqueueview.cpp b/widgets/playqueueview.cpp index be796ec65..45818b671 100644 --- a/widgets/playqueueview.cpp +++ b/widgets/playqueueview.cpp @@ -210,12 +210,6 @@ public: if (stream && album.isEmpty() && song.albumArtist().isEmpty()) { title=song.file; - if (HttpServer::self()->isOurs(title)) { - QString decoded=HttpServer::self()->decodeFileUrl(title); - if (!decoded.isEmpty()) { - title=decoded; - } - } if (song.title.isEmpty()) { trackTitle=QString(); }