TidalRequest: Only return error when no songs are received

Fixes #1061
This commit is contained in:
Jonas Kvinge
2022-10-28 21:46:12 +02:00
parent 41aeb0ac80
commit 5ca6513c04
2 changed files with 6 additions and 6 deletions

View File

@@ -1254,21 +1254,21 @@ void TidalRequest::FinishCheck() {
album_covers_received_ >= album_covers_requested_
) {
finished_ = true;
if (errors_.isEmpty()) {
if (songs_.isEmpty()) {
if (songs_.isEmpty()) {
if (errors_.isEmpty()) {
if (IsSearch()) {
emit Results(query_id_, SongMap(), tr("No match."));
}
else {
emit Results(query_id_, SongMap(), QString());
emit Results(query_id_);
}
}
else {
emit Results(query_id_, songs_, QString());
emit Results(query_id_, SongMap(), ErrorsToHTML(errors_));
}
}
else {
emit Results(query_id_, SongMap(), ErrorsToHTML(errors_));
emit Results(query_id_);
}
}