Improve lyrics match

This commit is contained in:
Jonas Kvinge
2023-10-08 23:55:05 +02:00
parent 1a07404c10
commit 505329730c
10 changed files with 38 additions and 31 deletions

View File

@@ -26,6 +26,7 @@
#include "core/shared_ptr.h"
#include "core/networkaccessmanager.h"
#include "utilities/transliterate.h"
#include "lyricssearchrequest.h"
#include "azlyricscomlyricsprovider.h"
@@ -43,8 +44,8 @@ QUrl AzLyricsComLyricsProvider::Url(const LyricsSearchRequest &request) {
}
QString AzLyricsComLyricsProvider::StringFixup(QString string) {
QString AzLyricsComLyricsProvider::StringFixup(QString text) {
return string.remove(QRegularExpression("[^\\w0-9\\-]", QRegularExpression::UseUnicodePropertiesOption)).simplified().toLower();
return Utilities::Transliterate(text).remove(QRegularExpression("[^\\w0-9\\-]")).toLower();
}