From 5b8894b0ff0dd18434f0271d8d9e4da437d75ac8 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 20 Dec 2020 06:16:08 +0100 Subject: [PATCH] Search all unicode letters in musixmatch lyrics search --- src/lyrics/musixmatchlyricsprovider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lyrics/musixmatchlyricsprovider.cpp b/src/lyrics/musixmatchlyricsprovider.cpp index c75ec3fdc..a2492ea5a 100644 --- a/src/lyrics/musixmatchlyricsprovider.cpp +++ b/src/lyrics/musixmatchlyricsprovider.cpp @@ -58,14 +58,14 @@ bool MusixmatchLyricsProvider::StartSearch(const QString &artist, const QString QString title_stripped = title; 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.replace(' ', '-'); artist_stripped = artist_stripped.replace(QRegularExpression("(-)\\1+"), "-"); artist_stripped = artist_stripped.toLower(); 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.replace(' ', '-').toLower(); title_stripped = title_stripped.replace(QRegularExpression("(-)\\1+"), "-");