LastFMImport: Fix progress
This commit is contained in:
@@ -197,7 +197,7 @@ void LastFMImport::ImportData(const bool lastplayed, const bool playcount) {
|
|||||||
|
|
||||||
void LastFMImport::FlushRequests() {
|
void LastFMImport::FlushRequests() {
|
||||||
|
|
||||||
if (!recent_tracks_requests_.isEmpty()) {
|
if (!recent_tracks_requests_.isEmpty() && (!playcount_ || (playcount_total_ > 0 || top_tracks_requests_.isEmpty()))) {
|
||||||
SendGetRecentTracksRequest(recent_tracks_requests_.dequeue());
|
SendGetRecentTracksRequest(recent_tracks_requests_.dequeue());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -519,8 +519,7 @@ void LastFMImport::GetTopTracksRequestFinished(QNetworkReply *reply, const int p
|
|||||||
|
|
||||||
void LastFMImport::UpdateTotalCheck() {
|
void LastFMImport::UpdateTotalCheck() {
|
||||||
|
|
||||||
if ((!playcount_ || playcount_total_ > 0) && (!lastplayed_ || lastplayed_total_ > 0))
|
Q_EMIT UpdateTotal(lastplayed_total_, playcount_total_);
|
||||||
Q_EMIT UpdateTotal(lastplayed_total_, playcount_total_);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user