Formatting

This commit is contained in:
Jonas Kvinge
2025-12-08 23:49:48 +01:00
parent 109ff90401
commit 93af866185
179 changed files with 1187 additions and 1269 deletions

View File

@@ -153,8 +153,7 @@ QString HtmlLyricsProvider::ParseLyricsFromHTML(const QString &content, const QR
start_idx = rematch_end_tag.capturedEnd();
}
}
}
while (tags > 0 && (rematch_start_tag.hasMatch() || rematch_end_tag.hasMatch()));
} while (tags > 0 && (rematch_start_tag.hasMatch() || rematch_end_tag.hasMatch()));
if (end_lyrics_idx != -1 && start_lyrics_idx < end_lyrics_idx) {
if (!lyrics.isEmpty()) {
@@ -163,8 +162,7 @@ QString HtmlLyricsProvider::ParseLyricsFromHTML(const QString &content, const QR
lyrics.append(content.mid(start_lyrics_idx, end_lyrics_idx - start_lyrics_idx).remove(u'\r').remove(u'\n'));
}
}
while (start_idx > 0 && multiple);
} while (start_idx > 0 && multiple);
for (auto it = regex_removes.cbegin(); it != regex_removes.cend(); it++) {
lyrics.remove(*it);

View File

@@ -158,7 +158,7 @@ void LyricFindLyricsProvider::HandleSearchReply(QNetworkReply *reply, const int
Error(u"Missing response."_s);
return;
}
//const QJsonObject obj_response = obj[QLatin1String("response")].toObject();
// const QJsonObject obj_response = obj[QLatin1String("response")].toObject();
if (!json_object.contains("track"_L1) || !json_object["track"_L1].isObject()) {
Error(u"Missing track."_s);

View File

@@ -1,21 +1,21 @@
/*
* Strawberry Music Player
* Copyright 2018-2021, Jonas Kvinge <jonas@jkvinge.net>
*
* Strawberry is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Strawberry is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*/
* Strawberry Music Player
* Copyright 2018-2021, Jonas Kvinge <jonas@jkvinge.net>
*
* Strawberry is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Strawberry is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef LYRICSSEARCHREQUEST_H
#define LYRICSSEARCHREQUEST_H

View File

@@ -1,21 +1,21 @@
/*
* Strawberry Music Player
* Copyright 2018-2021, Jonas Kvinge <jonas@jkvinge.net>
*
* Strawberry is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Strawberry is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*/
* Strawberry Music Player
* Copyright 2018-2021, Jonas Kvinge <jonas@jkvinge.net>
*
* Strawberry is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Strawberry is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef LYRICSSEARCHRESULT_H
#define LYRICSSEARCHRESULT_H

View File

@@ -141,6 +141,6 @@ void OVHLyricsProvider::HandleSearchReply(QNetworkReply *reply, const int id, co
else {
qLog(Debug) << "OVHLyrics: Got lyrics for" << request.artist << request.title;
results << LyricsSearchResult(Utilities::DecodeHtmlEntities(lyrics));
}
}
}

View File

@@ -38,7 +38,7 @@ class OVHLyricsProvider : public JsonLyricsProvider {
protected Q_SLOTS:
void StartSearch(const int id, const LyricsSearchRequest &request) override;
private:
private:
OVHLyricsProvider::JsonObjectResult ParseJsonObject(QNetworkReply *reply);
private Q_SLOTS: