Add track number to URL params

This commit is contained in:
craig
2012-03-02 20:26:20 +00:00
committed by craig
parent 3a36e2e851
commit 31388ec9ef

View File

@@ -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();
}
}
}