mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-30 11:04:57 +01:00
Grooveshark now returns a different error code when session id is invalid
This commit is contained in:
parent
a8ae737bce
commit
4d6406524f
@ -1651,10 +1651,11 @@ QVariantMap GroovesharkService::ExtractResult(QNetworkReply* reply) {
|
||||
QVariantList::iterator it;
|
||||
for (it = errors.begin(); it != errors.end(); ++it) {
|
||||
QVariantMap error = (*it).toMap();
|
||||
qLog(Error) << "Grooveshark error: " << error["message"].toString();
|
||||
qLog(Error) << "Grooveshark error: (" << error["code"].toInt() <<") " << error["message"].toString();
|
||||
switch (error["code"].toInt()) {
|
||||
case 100: // User auth required
|
||||
case 102: // User premium required
|
||||
case 300: // Session required
|
||||
// These errors can happen if session_id is obsolete (e.g. we haven't use
|
||||
// it for more than two weeks): force the user to login again
|
||||
Logout();
|
||||
|
Loading…
x
Reference in New Issue
Block a user