Refactor Tidal, Spotify, Qobuz, Subsonic and cover providers

Use common HTTP, Json and OAuthenticator class
This commit is contained in:
Jonas Kvinge
2025-03-08 23:11:07 +01:00
parent 7de8a44709
commit cd516c37b9
81 changed files with 2429 additions and 3968 deletions

View File

@@ -36,17 +36,23 @@
#include <QJsonArray>
#include "includes/shared_ptr.h"
#include "utilities/musixmatchprovider.h"
#include "utilities/strutils.h"
#include "core/logging.h"
#include "core/networkaccessmanager.h"
#include "utilities/strutils.h"
#include "jsonlyricsprovider.h"
#include "lyricssearchrequest.h"
#include "lyricssearchresult.h"
#include "musixmatchlyricsprovider.h"
#include "providers/musixmatchprovider.h"
using namespace Qt::Literals::StringLiterals;
using std::make_shared;
using namespace MusixmatchProvider;
namespace {
constexpr char kApiUrl[] = "https://api.musixmatch.com/ws/1.1";
constexpr char kApiKey[] = "Y2FhMDRlN2Y4OWE5OTIxYmZlOGMzOWQzOGI3ZGU4MjE=";
} // namespace
MusixmatchLyricsProvider::MusixmatchLyricsProvider(const SharedPtr<NetworkAccessManager> network, QObject *parent) : JsonLyricsProvider(u"Musixmatch"_s, true, false, network, parent), use_api_(true) {}

View File

@@ -33,12 +33,11 @@
#include "jsonlyricsprovider.h"
#include "lyricssearchrequest.h"
#include "lyricssearchresult.h"
#include "providers/musixmatchprovider.h"
class QNetworkReply;
class NetworkAccessManager;
class MusixmatchLyricsProvider : public JsonLyricsProvider, public MusixmatchProvider {
class MusixmatchLyricsProvider : public JsonLyricsProvider {
Q_OBJECT
public: