Allow local file playback without taglib

This commit is contained in:
craig.p.drummond
2013-10-18 18:58:33 +00:00
committed by craig.p.drummond
parent 349ad12cb7
commit 243c75b3ab
8 changed files with 10 additions and 56 deletions

View File

@@ -186,9 +186,9 @@ QByteArray HttpServer::encodeUrl(const Song &s) const
return url.toEncoded();
}
#ifdef TAGLIB_FOUND
QByteArray HttpServer::encodeUrl(const QString &file) const
{
Song s;
#ifdef Q_OS_WIN
QString f=fixWindowsPath(file);
DBUG << "file" << f << "orig" << file;
@@ -200,16 +200,19 @@ QByteArray HttpServer::encodeUrl(const QString &file) const
DBUG << "converted to share-path" << f;
}
}
Song s=Tags::read(f);
#ifdef TAGLIB_FOUND
s=Tags::read(f);
#endif
s.file=f;
#else
DBUG << "file" << file;
Song s=Tags::read(file);
#ifdef TAGLIB_FOUND
s=Tags::read(file);
#endif
s.file=file;
#endif
return encodeUrl(s);
}
#endif
Song HttpServer::decodeUrl(const QString &url) const
{