Use one instance of NetworkAccessManager

This commit is contained in:
Jonas Kvinge
2023-04-21 20:20:53 +02:00
parent bee6b7f946
commit 7fc5aef553
53 changed files with 270 additions and 311 deletions

View File

@@ -29,17 +29,18 @@
#include <QFutureWatcher>
#include <QString>
#include "core/networkaccessmanager.h"
#include "utilities/timeconstants.h"
#include "engine/chromaprinter.h"
#include "acoustidclient.h"
#include "musicbrainzclient.h"
#include "tagfetcher.h"
TagFetcher::TagFetcher(QObject *parent)
TagFetcher::TagFetcher(NetworkAccessManager *network, QObject *parent)
: QObject(parent),
fingerprint_watcher_(nullptr),
acoustid_client_(new AcoustidClient(this)),
musicbrainz_client_(new MusicBrainzClient(this)) {
acoustid_client_(new AcoustidClient(network, this)),
musicbrainz_client_(new MusicBrainzClient(network, this)) {
QObject::connect(acoustid_client_, &AcoustidClient::Finished, this, &TagFetcher::PuidsFound);
QObject::connect(musicbrainz_client_, &MusicBrainzClient::Finished, this, &TagFetcher::TagsFetched);