Decode HTML entities in lyrics

This commit is contained in:
Jonas Kvinge
2021-01-11 16:05:39 +01:00
parent c5cd648b5d
commit b85819ed9d
7 changed files with 21 additions and 6 deletions

View File

@@ -127,6 +127,7 @@ void ChartLyricsProvider::HandleSearchReply(QNetworkReply *reply, const quint64
else if (type == QXmlStreamReader::EndElement) {
if (name == "GetLyricResult") {
if (!result.artist.isEmpty() && !result.title.isEmpty() && !result.lyrics.isEmpty() && (result.artist.toLower() == artist.toLower() || result.title.toLower() == title.toLower())) {
result.lyrics = Utilities::DecodeHtmlEntities(result.lyrics);
results << result;
}
result = LyricsSearchResult();