NOISSUE update FTB URLs
This commit is contained in:
parent
4b7971f60f
commit
ec2732ccd1
@ -2,6 +2,8 @@
|
|||||||
#include <QDomDocument>
|
#include <QDomDocument>
|
||||||
#include "FtbPrivatePackManager.h"
|
#include "FtbPrivatePackManager.h"
|
||||||
|
|
||||||
|
#include "net/URLConstants.h"
|
||||||
|
|
||||||
void FtbPackFetchTask::fetch()
|
void FtbPackFetchTask::fetch()
|
||||||
{
|
{
|
||||||
publicPacks.clear();
|
publicPacks.clear();
|
||||||
@ -9,11 +11,11 @@ void FtbPackFetchTask::fetch()
|
|||||||
|
|
||||||
NetJob *netJob = new NetJob("FtbModpackFetch");
|
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();
|
qDebug() << "Downloading public version info from" << publicPacksUrl.toString();
|
||||||
netJob->addNetAction(Net::Download::makeByteArray(publicPacksUrl, &publicModpacksXmlFileData));
|
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();
|
qDebug() << "Downloading thirdparty version info from" << thirdPartyUrl.toString();
|
||||||
netJob->addNetAction(Net::Download::makeByteArray(thirdPartyUrl, &thirdPartyModpacksXmlFileData));
|
netJob->addNetAction(Net::Download::makeByteArray(thirdPartyUrl, &thirdPartyModpacksXmlFileData));
|
||||||
|
|
||||||
@ -26,7 +28,7 @@ void FtbPackFetchTask::fetch()
|
|||||||
|
|
||||||
void FtbPackFetchTask::fetchPrivate(const QStringList & toFetch)
|
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)
|
for (auto &packCode: toFetch)
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include "minecraft/ComponentList.h"
|
#include "minecraft/ComponentList.h"
|
||||||
#include "minecraft/GradleSpecifier.h"
|
#include "minecraft/GradleSpecifier.h"
|
||||||
|
|
||||||
|
#include "net/URLConstants.h"
|
||||||
|
|
||||||
FtbPackInstallTask::FtbPackInstallTask(FtbModpack pack, QString version)
|
FtbPackInstallTask::FtbPackInstallTask(FtbModpack pack, QString version)
|
||||||
{
|
{
|
||||||
m_pack = pack;
|
m_pack = pack;
|
||||||
@ -32,11 +34,11 @@ void FtbPackInstallTask::downloadPack()
|
|||||||
QString url;
|
QString url;
|
||||||
if(m_pack.type == FtbPackType::Private)
|
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
|
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));
|
job->addNetAction(Net::Download::makeCached(url, entry));
|
||||||
archivePath = entry->getFullPath();
|
archivePath = entry->getFullPath();
|
||||||
|
@ -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_OUR_BASE_URL("https://files.multimc.org/fmllibs/");
|
||||||
const QString FMLLIBS_FORGE_BASE_URL("https://files.minecraftforge.net/fmllibs/");
|
const QString FMLLIBS_FORGE_BASE_URL("https://files.minecraftforge.net/fmllibs/");
|
||||||
const QString TRANSLATIONS_BASE_URL("https://files.multimc.org/translations/");
|
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 getJarPath(QString version);
|
||||||
QString getLegacyJarUrl(QString version);
|
QString getLegacyJarUrl(QString version);
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
#include <RWStorage.h>
|
#include <RWStorage.h>
|
||||||
#include <Env.h>
|
#include <Env.h>
|
||||||
|
|
||||||
|
#include "net/URLConstants.h"
|
||||||
|
|
||||||
FtbFilterModel::FtbFilterModel(QObject *parent) : QSortFilterProxyModel(parent)
|
FtbFilterModel::FtbFilterModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||||
{
|
{
|
||||||
currentSorting = Sorting::ByGameVersion;
|
currentSorting = Sorting::ByGameVersion;
|
||||||
@ -214,7 +216,7 @@ void FtbListModel::requestLogo(QString file)
|
|||||||
|
|
||||||
MetaEntryPtr entry = ENV.metacache()->resolveEntry("FTBPacks", QString("logos/%1").arg(file.section(".", 0, 0)));
|
MetaEntryPtr entry = ENV.metacache()->resolveEntry("FTBPacks", QString("logos/%1").arg(file.section(".", 0, 0)));
|
||||||
NetJob *job = new NetJob(QString("FTB Icon Download for %1").arg(file));
|
NetJob *job = new NetJob(QString("FTB Icon Download for %1").arg(file));
|
||||||
job->addNetAction(Net::Download::makeCached(QUrl(QString("https://ftb.cursecdn.com/FTB2/static/%1").arg(file)), entry));
|
job->addNetAction(Net::Download::makeCached(QUrl(QString(URLConstants::FTB_CDN_BASE_URL + "static/%1").arg(file)), entry));
|
||||||
|
|
||||||
auto fullPath = entry->getFullPath();
|
auto fullPath = entry->getFullPath();
|
||||||
QObject::connect(job, &NetJob::finished, this, [this, file, fullPath]
|
QObject::connect(job, &NetJob::finished, this, [this, file, fullPath]
|
||||||
|
Loading…
Reference in New Issue
Block a user