From 019e5ca3e819f5daf9933bc0fb091784b0ca561f Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sat, 12 Aug 2023 11:11:58 +0200 Subject: [PATCH] fix: use ApiDownload for CF URL handling Signed-off-by: Sefa Eyeoglu --- launcher/modplatform/flame/FlameAPI.cpp | 2 +- launcher/ui/MainWindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/modplatform/flame/FlameAPI.cpp b/launcher/modplatform/flame/FlameAPI.cpp index 2871f06a0..93d3b76a0 100644 --- a/launcher/modplatform/flame/FlameAPI.cpp +++ b/launcher/modplatform/flame/FlameAPI.cpp @@ -208,7 +208,7 @@ Task::Ptr FlameAPI::getFile(const QString& addonId, const QString& fileId, std:: { auto netJob = makeShared(QString("Flame::GetFile"), APPLICATION->network()); netJob->addNetAction( - Net::Download::makeByteArray(QUrl(QString("https://api.curseforge.com/v1/mods/%1/files/%2").arg(addonId, fileId)), response)); + Net::ApiDownload::makeByteArray(QUrl(QString("https://api.curseforge.com/v1/mods/%1/files/%2").arg(addonId, fileId)), response)); QObject::connect(netJob.get(), &NetJob::failed, [addonId, fileId] { qDebug() << "Flame API file failure" << addonId << fileId; }); diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index dd383b239..8300fe295 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -85,7 +85,7 @@ #include #include #include -#include +#include #include #include #include @@ -1046,7 +1046,7 @@ void MainWindow::processURLs(QList urls) auto entry = APPLICATION->metacache()->resolveEntry("general", path); entry->setStale(true); auto dl_job = unique_qobject_ptr(new NetJob(tr("Modpack download"), APPLICATION->network())); - dl_job->addNetAction(Net::Download::makeCached(dl_url, entry)); + dl_job->addNetAction(Net::ApiDownload::makeCached(dl_url, entry)); auto archivePath = entry->getFullPath(); bool dl_success = false;