Add track number to URL params
This commit is contained in:
@@ -140,6 +140,9 @@ QByteArray HttpServer::encodeUrl(const Song &s) const
|
||||
if (s.time) {
|
||||
url.addQueryItem("time", QString::number(s.time));
|
||||
}
|
||||
if (s.track) {
|
||||
url.addQueryItem("track", QString::number(s.track));
|
||||
}
|
||||
url.addQueryItem("cantata", "song");
|
||||
return url.toEncoded();
|
||||
}
|
||||
@@ -187,6 +190,9 @@ Song HttpServer::decodeUrl(const QString &url) const
|
||||
if (u.hasQueryItem("time")) {
|
||||
s.time=u.queryItemValue("time").toInt();
|
||||
}
|
||||
if (u.hasQueryItem("track")) {
|
||||
s.track=u.queryItemValue("track").toInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user