mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-28 16:20:26 +01:00
GeniusLyricsProvider: Convert client ID and secret from base64
Fixes #1554
This commit is contained in:
parent
f11de5bfc2
commit
0e7ab1cab8
@ -134,7 +134,7 @@ void GeniusLyricsProvider::Authenticate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QUrlQuery url_query;
|
QUrlQuery url_query;
|
||||||
url_query.addQueryItem(QStringLiteral("client_id"), QString::fromLatin1(QUrl::toPercentEncoding(QLatin1String(kClientIDB64))));
|
url_query.addQueryItem(QStringLiteral("client_id"), QString::fromLatin1(QUrl::toPercentEncoding(QString::fromLatin1(QByteArray::fromBase64(kClientIDB64)))));
|
||||||
url_query.addQueryItem(QStringLiteral("redirect_uri"), QString::fromLatin1(QUrl::toPercentEncoding(redirect_url.toString())));
|
url_query.addQueryItem(QStringLiteral("redirect_uri"), QString::fromLatin1(QUrl::toPercentEncoding(redirect_url.toString())));
|
||||||
url_query.addQueryItem(QStringLiteral("scope"), QStringLiteral("me"));
|
url_query.addQueryItem(QStringLiteral("scope"), QStringLiteral("me"));
|
||||||
url_query.addQueryItem(QStringLiteral("state"), QString::fromLatin1(QUrl::toPercentEncoding(code_challenge_)));
|
url_query.addQueryItem(QStringLiteral("state"), QString::fromLatin1(QUrl::toPercentEncoding(code_challenge_)));
|
||||||
@ -198,8 +198,8 @@ void GeniusLyricsProvider::RequestAccessToken(const QUrl &url, const QUrl &redir
|
|||||||
|
|
||||||
QUrlQuery new_url_query;
|
QUrlQuery new_url_query;
|
||||||
new_url_query.addQueryItem(QStringLiteral("code"), QString::fromLatin1(QUrl::toPercentEncoding(code)));
|
new_url_query.addQueryItem(QStringLiteral("code"), QString::fromLatin1(QUrl::toPercentEncoding(code)));
|
||||||
new_url_query.addQueryItem(QStringLiteral("client_id"), QString::fromLatin1(QUrl::toPercentEncoding(QLatin1String(kClientIDB64))));
|
new_url_query.addQueryItem(QStringLiteral("client_id"), QString::fromLatin1(QUrl::toPercentEncoding(QString::fromLatin1(QByteArray::fromBase64(kClientIDB64)))));
|
||||||
new_url_query.addQueryItem(QStringLiteral("client_secret"), QString::fromLatin1(QUrl::toPercentEncoding(QLatin1String(kClientSecretB64))));
|
new_url_query.addQueryItem(QStringLiteral("client_secret"), QString::fromLatin1(QUrl::toPercentEncoding(QString::fromLatin1(QByteArray::fromBase64(kClientSecretB64)))));
|
||||||
new_url_query.addQueryItem(QStringLiteral("redirect_uri"), QString::fromLatin1(QUrl::toPercentEncoding(redirect_url.toString())));
|
new_url_query.addQueryItem(QStringLiteral("redirect_uri"), QString::fromLatin1(QUrl::toPercentEncoding(redirect_url.toString())));
|
||||||
new_url_query.addQueryItem(QStringLiteral("grant_type"), QStringLiteral("authorization_code"));
|
new_url_query.addQueryItem(QStringLiteral("grant_type"), QStringLiteral("authorization_code"));
|
||||||
new_url_query.addQueryItem(QStringLiteral("response_type"), QStringLiteral("code"));
|
new_url_query.addQueryItem(QStringLiteral("response_type"), QStringLiteral("code"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user