Move lyrics providers to own thread

This commit is contained in:
Jonas Kvinge
2024-08-24 20:07:36 +02:00
parent 77e934beab
commit 2c0ad2fc88
26 changed files with 182 additions and 92 deletions

View File

@@ -19,7 +19,6 @@
#include "config.h"
#include <QObject>
#include <QString>
#include "core/shared_ptr.h"
@@ -28,3 +27,11 @@
LyricsProvider::LyricsProvider(const QString &name, const bool enabled, const bool authentication_required, SharedPtr<NetworkAccessManager> network, QObject *parent)
: QObject(parent), network_(network), name_(name), enabled_(enabled), order_(0), authentication_required_(authentication_required) {}
bool LyricsProvider::StartSearchAsync(const int id, const LyricsSearchRequest &request) {
QMetaObject::invokeMethod(this, "StartSearch", Qt::QueuedConnection, Q_ARG(int, id), Q_ARG(LyricsSearchRequest, request));
return true;
}