aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/legacy_ftb
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-15 12:49:21 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-15 12:49:21 +0300
commitcf27d2f9ab206e24f7dfd909a88d7db48fd0a74a (patch)
tree63675a840a90712b8b1468e87569fade7b11deb6 /launcher/modplatform/legacy_ftb
parentb2fdd8359405c93d0d93aa8c68971c986a1f68cb (diff)
parent8f5bb982cd27dd9158b63d826769c168455a139b (diff)
downloadPrismLauncher-cf27d2f9ab206e24f7dfd909a88d7db48fd0a74a.tar.gz
PrismLauncher-cf27d2f9ab206e24f7dfd909a88d7db48fd0a74a.tar.bz2
PrismLauncher-cf27d2f9ab206e24f7dfd909a88d7db48fd0a74a.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into download_threads
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/legacy_ftb')
-rw-r--r--launcher/modplatform/legacy_ftb/PackFetchTask.cpp6
-rw-r--r--launcher/modplatform/legacy_ftb/PackInstallTask.cpp4
2 files changed, 7 insertions, 3 deletions
diff --git a/launcher/modplatform/legacy_ftb/PackFetchTask.cpp b/launcher/modplatform/legacy_ftb/PackFetchTask.cpp
index 6d27357a..8f1a6e2f 100644
--- a/launcher/modplatform/legacy_ftb/PackFetchTask.cpp
+++ b/launcher/modplatform/legacy_ftb/PackFetchTask.cpp
@@ -40,6 +40,8 @@
#include "Application.h"
#include "BuildConfig.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 91c821f0..761f622b 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);