diff options
Diffstat (limited to 'api/logic/modplatform/ftb')
-rw-r--r-- | api/logic/modplatform/ftb/FtbPackFetchTask.cpp | 8 | ||||
-rw-r--r-- | api/logic/modplatform/ftb/FtbPackInstallTask.cpp | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/api/logic/modplatform/ftb/FtbPackFetchTask.cpp b/api/logic/modplatform/ftb/FtbPackFetchTask.cpp index 19f6c31a..fe3f3fac 100644 --- a/api/logic/modplatform/ftb/FtbPackFetchTask.cpp +++ b/api/logic/modplatform/ftb/FtbPackFetchTask.cpp @@ -2,6 +2,8 @@ #include <QDomDocument> #include "FtbPrivatePackManager.h" +#include "net/URLConstants.h" + void FtbPackFetchTask::fetch() { publicPacks.clear(); @@ -9,11 +11,11 @@ void FtbPackFetchTask::fetch() NetJob *netJob = new NetJob("FtbModpackFetch"); - QUrl publicPacksUrl = QUrl("https://ftb.cursecdn.com/FTB2/static/modpacks.xml"); + QUrl publicPacksUrl = QUrl(URLConstants::FTB_CDN_BASE_URL + "static/modpacks.xml"); qDebug() << "Downloading public version info from" << publicPacksUrl.toString(); netJob->addNetAction(Net::Download::makeByteArray(publicPacksUrl, &publicModpacksXmlFileData)); - QUrl thirdPartyUrl = QUrl("https://ftb.cursecdn.com/FTB2/static/thirdparty.xml"); + QUrl thirdPartyUrl = QUrl(URLConstants::FTB_CDN_BASE_URL + "static/thirdparty.xml"); qDebug() << "Downloading thirdparty version info from" << thirdPartyUrl.toString(); netJob->addNetAction(Net::Download::makeByteArray(thirdPartyUrl, &thirdPartyModpacksXmlFileData)); @@ -26,7 +28,7 @@ void FtbPackFetchTask::fetch() void FtbPackFetchTask::fetchPrivate(const QStringList & toFetch) { - QString privatePackBaseUrl = QString("https://ftb.cursecdn.com/FTB2/static/%1.xml"); + QString privatePackBaseUrl = URLConstants::FTB_CDN_BASE_URL + "static/%1.xml"; for (auto &packCode: toFetch) { diff --git a/api/logic/modplatform/ftb/FtbPackInstallTask.cpp b/api/logic/modplatform/ftb/FtbPackInstallTask.cpp index ecacda02..4962bcac 100644 --- a/api/logic/modplatform/ftb/FtbPackInstallTask.cpp +++ b/api/logic/modplatform/ftb/FtbPackInstallTask.cpp @@ -9,6 +9,8 @@ #include "minecraft/ComponentList.h" #include "minecraft/GradleSpecifier.h" +#include "net/URLConstants.h" + FtbPackInstallTask::FtbPackInstallTask(FtbModpack pack, QString version) { m_pack = pack; @@ -32,11 +34,11 @@ void FtbPackInstallTask::downloadPack() QString url; if(m_pack.type == FtbPackType::Private) { - url = QString("https://ftb.cursecdn.com/FTB2/privatepacks/%1").arg(packoffset); + url = QString(URLConstants::FTB_CDN_BASE_URL + "privatepacks/%1").arg(packoffset); } else { - url = QString("https://ftb.cursecdn.com/FTB2/modpacks/%1").arg(packoffset); + url = QString(URLConstants::FTB_CDN_BASE_URL + "modpacks/%1").arg(packoffset); } job->addNetAction(Net::Download::makeCached(url, entry)); archivePath = entry->getFullPath(); |