1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-15 10:08:08 +01:00

Search all unicode letters in musixmatch lyrics search

This commit is contained in:
Jonas Kvinge 2020-12-20 06:16:08 +01:00
parent a4329dd9a0
commit 5b8894b0ff

View File

@ -58,14 +58,14 @@ bool MusixmatchLyricsProvider::StartSearch(const QString &artist, const QString
QString title_stripped = title; QString title_stripped = title;
artist_stripped = artist_stripped.replace('/', '-'); artist_stripped = artist_stripped.replace('/', '-');
artist_stripped = artist_stripped.remove(QRegularExpression("[^A-Za-z0-9\\- ]")); artist_stripped = artist_stripped.remove(QRegularExpression("[^\\w0-9\\- ]", QRegularExpression::UseUnicodePropertiesOption));
artist_stripped = artist_stripped.simplified(); artist_stripped = artist_stripped.simplified();
artist_stripped = artist_stripped.replace(' ', '-'); artist_stripped = artist_stripped.replace(' ', '-');
artist_stripped = artist_stripped.replace(QRegularExpression("(-)\\1+"), "-"); artist_stripped = artist_stripped.replace(QRegularExpression("(-)\\1+"), "-");
artist_stripped = artist_stripped.toLower(); artist_stripped = artist_stripped.toLower();
title_stripped = title_stripped.replace('/', '-'); title_stripped = title_stripped.replace('/', '-');
title_stripped = title_stripped.remove(QRegularExpression("[^a-zA-Z0-9\\- ]")); title_stripped = title_stripped.remove(QRegularExpression("[^\\w0-9\\- ]", QRegularExpression::UseUnicodePropertiesOption));
title_stripped = title_stripped.simplified(); title_stripped = title_stripped.simplified();
title_stripped = title_stripped.replace(' ', '-').toLower(); title_stripped = title_stripped.replace(' ', '-').toLower();
title_stripped = title_stripped.replace(QRegularExpression("(-)\\1+"), "-"); title_stripped = title_stripped.replace(QRegularExpression("(-)\\1+"), "-");