From 6de8eb56cdb7aad18ee292fd8fb6a72749a9c26b Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 20 Sep 2018 22:29:35 +0200 Subject: [PATCH] Remove dead code in Tidal --- src/tidal/tidalservice.cpp | 15 +-------------- src/tidal/tidalservice.h | 2 -- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/tidal/tidalservice.cpp b/src/tidal/tidalservice.cpp index b1a0e8ccd..8f5e4db88 100644 --- a/src/tidal/tidalservice.cpp +++ b/src/tidal/tidalservice.cpp @@ -463,9 +463,7 @@ void TidalService::ClearSearch() { search_text_.clear(); search_error_.clear(); albums_requested_ = 0; - songs_requested_ = 0; albums_received_ = 0; - songs_received_ = 0; requests_album_.clear(); requests_song_.clear(); login_attempts_ = 0; @@ -604,11 +602,6 @@ void TidalService::SearchFinished(QNetworkReply *reply, int id) { emit ProgressSetMaximum(albums_requested_); emit UpdateProgress(0); } - else if (songs_requested_ > 0) { - emit UpdateStatus(QString("Retriving %1 song%2...").arg(songs_requested_).arg(songs_requested_ == 1 ? "" : "s")); - emit ProgressSetMaximum(songs_requested_); - emit UpdateProgress(songs_received_); - } CheckFinish(); @@ -662,12 +655,6 @@ void TidalService::GetAlbumFinished(QNetworkReply *reply, int search_id, int alb songs_ << song; } - if (albums_requested_ <= albums_received_) { - emit UpdateStatus(QString("Retriving %1 song%2...").arg(songs_requested_).arg(songs_requested_ == 1 ? "" : "s")); - emit ProgressSetMaximum(songs_requested_); - emit UpdateProgress(songs_received_); - } - CheckFinish(); } @@ -846,7 +833,7 @@ void TidalService::CheckFinish() { if (search_id_ == 0) return; - if (!login_sent_ && albums_requested_ <= albums_received_ && songs_requested_ <= songs_received_) { + if (!login_sent_ && albums_requested_ <= albums_received_) { if (songs_.isEmpty()) { if (search_error_.isEmpty()) emit SearchError(search_id_, "Unknown error"); else emit SearchError(search_id_, search_error_); diff --git a/src/tidal/tidalservice.h b/src/tidal/tidalservice.h index 5b7cee1cb..0819878e4 100644 --- a/src/tidal/tidalservice.h +++ b/src/tidal/tidalservice.h @@ -132,8 +132,6 @@ class TidalService : public InternetService { QHash requests_song_; int albums_requested_; int albums_received_; - int songs_requested_; - int songs_received_; SongList songs_; QString search_error_; bool login_sent_;