GeniusLyrics: update to parse latest HTML of returned lyrics,

devolving the removal of various crud to `HtmlLyricsProvider`;
  log initial query and use new `StartsOrEndsMatch()` static to
  match JSON replies, log each request, and break if full match;
  `StartsOrEndsMatch()` ignores some common punctuation variations
   & normalizes single quotes and allows match at beginning or end
HtmlLyricsProvider: fix `multiple` mode not to terminate on first
  batch, and defer processing till have whole HTML (avoids issues
  with tags spanning batches);
  add param to take list of regular expressions to remove from HTML
  prior to general processing (used only by `GeniusLyrics` for now)
README.md etc: update list of lyrics providers supported
This commit is contained in:
gitlost
2025-07-08 22:31:16 +01:00
committed by Jonas Kvinge
parent ee7bb449a5
commit 9030b2567b
9 changed files with 65 additions and 35 deletions

View File

@@ -79,6 +79,9 @@ class GeniusLyricsProvider : public JsonLyricsProvider {
void HandleSearchReply(QNetworkReply *reply, const int id);
void HandleLyricReply(QNetworkReply *reply, const int search_id, const QUrl &url);
private:
static bool StartsOrEndsMatch(QString s, QString t);
private:
OAuthenticator *oauth_;
mutable QMutex mutex_access_token_;