Improve lyrics searcher

This commit is contained in:
Jonas Kvinge
2019-06-06 18:22:41 +02:00
parent 427808226f
commit 059c4beb30
8 changed files with 30 additions and 31 deletions

View File

@@ -112,7 +112,9 @@ void ChartLyricsProvider::HandleSearchReply(QNetworkReply *reply, quint64 id, co
result.score = 0.0;
if (result.artist.toLower() == artist.toLower()) result.score += 1.0;
if (result.title.toLower() == title.toLower()) result.score += 1.0;
results << result;
if (result.artist.toLower() == artist.toLower() || result.title.toLower() == title.toLower()) {
results << result;
}
}
result = LyricsSearchResult();
}