mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 12:02:48 +01:00
Fix non-ending task in GS which may happen if the user log out (or is logged out because session became invalid)
This commit is contained in:
parent
07c7bd9bb2
commit
63c42503c6
@ -749,6 +749,7 @@ void GroovesharkService::RetrieveUserFavorites() {
|
|||||||
|
|
||||||
void GroovesharkService::UserFavoritesRetrieved(QNetworkReply* reply, int task_id) {
|
void GroovesharkService::UserFavoritesRetrieved(QNetworkReply* reply, int task_id) {
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
|
app_->task_manager()->SetTaskFinished(task_id);
|
||||||
|
|
||||||
if (!favorites_) {
|
if (!favorites_) {
|
||||||
// The use probably logged out before the response arrived.
|
// The use probably logged out before the response arrived.
|
||||||
@ -767,7 +768,6 @@ void GroovesharkService::UserFavoritesRetrieved(QNetworkReply* reply, int task_i
|
|||||||
|
|
||||||
favorites_->appendRow(child);
|
favorites_->appendRow(child);
|
||||||
}
|
}
|
||||||
app_->task_manager()->SetTaskFinished(task_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroovesharkService::RetrieveUserLibrarySongs() {
|
void GroovesharkService::RetrieveUserLibrarySongs() {
|
||||||
@ -781,6 +781,7 @@ void GroovesharkService::RetrieveUserLibrarySongs() {
|
|||||||
|
|
||||||
void GroovesharkService::UserLibrarySongsRetrieved(QNetworkReply* reply, int task_id) {
|
void GroovesharkService::UserLibrarySongsRetrieved(QNetworkReply* reply, int task_id) {
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
|
app_->task_manager()->SetTaskFinished(task_id);
|
||||||
|
|
||||||
if (!library_) {
|
if (!library_) {
|
||||||
// The use probably logged out before the response arrived.
|
// The use probably logged out before the response arrived.
|
||||||
@ -799,7 +800,6 @@ void GroovesharkService::UserLibrarySongsRetrieved(QNetworkReply* reply, int tas
|
|||||||
|
|
||||||
library_->appendRow(child);
|
library_->appendRow(child);
|
||||||
}
|
}
|
||||||
app_->task_manager()->SetTaskFinished(task_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroovesharkService::RetrievePopularSongs() {
|
void GroovesharkService::RetrievePopularSongs() {
|
||||||
|
Loading…
Reference in New Issue
Block a user