Fix "Invalid key" error in lastfm auth

This commit is contained in:
Chocobozzz 2018-02-19 08:41:41 +01:00 committed by John Maguire
parent b04367937a
commit a1a892b35e
1 changed files with 3 additions and 2 deletions

View File

@ -145,13 +145,14 @@ QByteArray SignApiRequest(QList<QPair<QString, QString>> params) {
void LastFMService::Authenticate() {
QUrl url("https://www.last.fm/api/auth/");
QUrlQuery url_query;
url_query.addQueryItem("api_key", kApiKey);
LocalRedirectServer* server = new LocalRedirectServer(this);
server->Listen();
QUrlQuery url_query;
url_query.addQueryItem("api_key", kApiKey);
url_query.addQueryItem("cb", server->url().toString());
url.setQuery(url_query);
NewClosure(server, SIGNAL(Finished()), [this, server]() {
server->deleteLater();