ScrobblingAPI20: Ignore permission related error
Last.fm returns permission denied error when servers are overloaded, ignore this error instead. Fixes #442
This commit is contained in:
parent
42d6c79710
commit
53fc939e35
@ -174,13 +174,10 @@ ScrobblingAPI20::ReplyResult ScrobblingAPI20::GetJsonObject(QNetworkReply *reply
|
|||||||
reply_error_type = ReplyResult::APIError;
|
reply_error_type = ReplyResult::APIError;
|
||||||
}
|
}
|
||||||
const ScrobbleErrorCode lastfm_error_code = static_cast<ScrobbleErrorCode>(error_code);
|
const ScrobbleErrorCode lastfm_error_code = static_cast<ScrobbleErrorCode>(error_code);
|
||||||
if (reply->error() == QNetworkReply::ContentAccessDenied ||
|
if (reply->error() == QNetworkReply::AuthenticationRequiredError ||
|
||||||
reply->error() == QNetworkReply::ContentOperationNotPermittedError ||
|
|
||||||
reply->error() == QNetworkReply::AuthenticationRequiredError ||
|
|
||||||
lastfm_error_code == ScrobbleErrorCode::InvalidSessionKey ||
|
lastfm_error_code == ScrobbleErrorCode::InvalidSessionKey ||
|
||||||
lastfm_error_code == ScrobbleErrorCode::UnauthorizedToken ||
|
lastfm_error_code == ScrobbleErrorCode::UnauthorizedToken ||
|
||||||
lastfm_error_code == ScrobbleErrorCode::LoginRequired ||
|
lastfm_error_code == ScrobbleErrorCode::LoginRequired ||
|
||||||
lastfm_error_code == ScrobbleErrorCode::AuthenticationFailed ||
|
|
||||||
lastfm_error_code == ScrobbleErrorCode::APIKeySuspended
|
lastfm_error_code == ScrobbleErrorCode::APIKeySuspended
|
||||||
) {
|
) {
|
||||||
// Session is probably expired
|
// Session is probably expired
|
||||||
|
Loading…
x
Reference in New Issue
Block a user