diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-01-04 01:48:36 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-01-04 01:48:36 +0100 |
commit | ec2732ccd16778c433d2312793b65edb131bc7c5 (patch) | |
tree | 3f19f3df7e3d6fac24bcbc465f2c9be572e4ee94 /api | |
parent | 4b7971f60fd7ab7cbbd6fd50b14e9361fe6de036 (diff) | |
download | PrismLauncher-ec2732ccd16778c433d2312793b65edb131bc7c5.tar.gz PrismLauncher-ec2732ccd16778c433d2312793b65edb131bc7c5.tar.bz2 PrismLauncher-ec2732ccd16778c433d2312793b65edb131bc7c5.zip |
NOISSUE update FTB URLs
Diffstat (limited to 'api')
-rw-r--r-- | api/logic/modplatform/ftb/FtbPackFetchTask.cpp | 8 | ||||
-rw-r--r-- | api/logic/modplatform/ftb/FtbPackInstallTask.cpp | 6 | ||||
-rw-r--r-- | api/logic/net/URLConstants.h | 1 |
3 files changed, 10 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(); diff --git a/api/logic/net/URLConstants.h b/api/logic/net/URLConstants.h index 5365894b..0219a446 100644 --- a/api/logic/net/URLConstants.h +++ b/api/logic/net/URLConstants.h @@ -29,6 +29,7 @@ const QString IMGUR_BASE_URL("https://api.imgur.com/3/"); const QString FMLLIBS_OUR_BASE_URL("https://files.multimc.org/fmllibs/"); const QString FMLLIBS_FORGE_BASE_URL("https://files.minecraftforge.net/fmllibs/"); const QString TRANSLATIONS_BASE_URL("https://files.multimc.org/translations/"); +const QString FTB_CDN_BASE_URL("https://ftb.forgecdn.net/FTB2/"); QString getJarPath(QString version); QString getLegacyJarUrl(QString version); |