Remove dead code in Tidal

This commit is contained in:
Jonas Kvinge 2018-09-20 22:29:35 +02:00
parent 04e272d9bc
commit 6de8eb56cd
2 changed files with 1 additions and 16 deletions

View File

@ -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_);

View File

@ -132,8 +132,6 @@ class TidalService : public InternetService {
QHash<int, QUrl> requests_song_;
int albums_requested_;
int albums_received_;
int songs_requested_;
int songs_received_;
SongList songs_;
QString search_error_;
bool login_sent_;