Increase lyrics score if lyrics text > 60

This commit is contained in:
Jonas Kvinge
2020-01-02 19:21:27 +01:00
parent 7f442cff3b
commit 443be1c2c8
6 changed files with 13 additions and 0 deletions

View File

@@ -112,6 +112,7 @@ void ChartLyricsProvider::HandleSearchReply(QNetworkReply *reply, const quint64
result.score = 0.0;
if (result.artist.toLower() == artist.toLower()) result.score += 1.0;
if (result.title.toLower() == title.toLower()) result.score += 1.0;
if (result.lyrics.length() > LyricsFetcher::kGoodLyricsLength) result.score += 1.0;
if (result.artist.toLower() == artist.toLower() || result.title.toLower() == title.toLower()) {
results << result;
}