From 74ec7eeee3de7e5b1a7f07206da65b604356f9be Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 4 Nov 2019 13:25:05 +0000 Subject: lyrics: added settings dialog, fixed remaining issues git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9093 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/lyrics/lyricsprovider.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/plugins/General/lyrics/lyricsprovider.cpp') diff --git a/src/plugins/General/lyrics/lyricsprovider.cpp b/src/plugins/General/lyrics/lyricsprovider.cpp index 4dae451dd..755e1ba06 100644 --- a/src/plugins/General/lyrics/lyricsprovider.cpp +++ b/src/plugins/General/lyrics/lyricsprovider.cpp @@ -101,6 +101,9 @@ QString LyricsProvider::format(const QByteArray &data, const TrackInfo &track) c return QString(); } + if(m_skipRules) + return content; + const QMap replaceMap = generateReplaceMap(track); for(const Rule &rule : qAsConst(m_extractRules)) @@ -157,6 +160,11 @@ const QString &LyricsProvider::name() const return m_name; } +void LyricsProvider::skipRules(bool skip) +{ + m_skipRules = skip; +} + QString LyricsProvider::fixCase(const QString &title) const { QString out; @@ -201,7 +209,6 @@ QString LyricsProvider::extract(const QString &content, const Rule &rule) const for(const Item &item : qAsConst(rule)) { - if(!item.url.isEmpty()) { QString url = item.url; -- cgit v1.2.3-13-gbd6f