diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-04 20:31:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 20:31:43 +0200 |
commit | 304e294ea701e595b21c0a8a8236ca53828f2b3b (patch) | |
tree | 66770810d344120899cf8ba07f279bac784f4877 /launcher/modplatform/legacy_ftb | |
parent | 50c7d39e082f0a7dbd977401e16d5adf534d9770 (diff) | |
parent | f19e8dd086cd046c694a4a9a02d83827b08952b0 (diff) | |
download | PrismLauncher-304e294ea701e595b21c0a8a8236ca53828f2b3b.tar.gz PrismLauncher-304e294ea701e595b21c0a8a8236ca53828f2b3b.tar.bz2 PrismLauncher-304e294ea701e595b21c0a8a8236ca53828f2b3b.zip |
Merge pull request #1102 from Ryex/refactor/net-split-headers-to-proxy-class
Diffstat (limited to 'launcher/modplatform/legacy_ftb')
-rw-r--r-- | launcher/modplatform/legacy_ftb/PackFetchTask.cpp | 6 | ||||
-rw-r--r-- | launcher/modplatform/legacy_ftb/PackInstallTask.cpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/launcher/modplatform/legacy_ftb/PackFetchTask.cpp b/launcher/modplatform/legacy_ftb/PackFetchTask.cpp index a8a0fc2c..e5ad8244 100644 --- a/launcher/modplatform/legacy_ftb/PackFetchTask.cpp +++ b/launcher/modplatform/legacy_ftb/PackFetchTask.cpp @@ -40,6 +40,8 @@ #include "BuildConfig.h" #include "Application.h" +#include "net/ApiDownload.h" + namespace LegacyFTB { void PackFetchTask::fetch() @@ -51,7 +53,7 @@ void PackFetchTask::fetch() QUrl publicPacksUrl = QUrl(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "static/modpacks.xml"); qDebug() << "Downloading public version info from" << publicPacksUrl.toString(); - jobPtr->addNetAction(Net::Download::makeByteArray(publicPacksUrl, publicModpacksXmlFileData)); + jobPtr->addNetAction(Net::ApiDownload::makeByteArray(publicPacksUrl, publicModpacksXmlFileData)); QUrl thirdPartyUrl = QUrl(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "static/thirdparty.xml"); qDebug() << "Downloading thirdparty version info from" << thirdPartyUrl.toString(); @@ -71,7 +73,7 @@ void PackFetchTask::fetchPrivate(const QStringList& toFetch) for (auto& packCode : toFetch) { auto data = std::make_shared<QByteArray>(); NetJob* job = new NetJob("Fetching private pack", m_network); - job->addNetAction(Net::Download::makeByteArray(privatePackBaseUrl.arg(packCode), data)); + job->addNetAction(Net::ApiDownload::makeByteArray(privatePackBaseUrl.arg(packCode), data)); QObject::connect(job, &NetJob::succeeded, this, [this, job, data, packCode] { ModpackList packs; diff --git a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp index 1afe5783..beb295dc 100644 --- a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp +++ b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp @@ -48,6 +48,8 @@ #include "Application.h" #include "BuildConfig.h" +#include "net/ApiDownload.h" + namespace LegacyFTB { PackInstallTask::PackInstallTask(shared_qobject_ptr<QNetworkAccessManager> network, Modpack pack, QString version) @@ -77,7 +79,7 @@ void PackInstallTask::downloadPack() } else { url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "modpacks/%1").arg(archivePath); } - netJobContainer->addNetAction(Net::Download::makeFile(url, archivePath)); + netJobContainer->addNetAction(Net::ApiDownload::makeFile(url, archivePath)); connect(netJobContainer.get(), &NetJob::succeeded, this, &PackInstallTask::unzip); connect(netJobContainer.get(), &NetJob::failed, this, &PackInstallTask::emitFailed); |