Permalink
Browse files

NOISSUE take forge xz download url base from the metadata file

Instead of hardcoding it.
  • Loading branch information...
peterix committed Nov 4, 2018
1 parent 58260da commit 8a7f1e405f0ac57adcff455d5ca00a5f08f10868
@@ -105,7 +105,7 @@ QList< std::shared_ptr< NetAction > > Library::getDownloads(OpSys system, class
if (isForge)
{
qDebug() << "XzDownload for:" << rawName() << "storage:" << storage << "url:" << url;
out.append(ForgeXzDownload::make(storage, entry));
out.append(ForgeXzDownload::make(url, storage, entry));
}
else
{
@@ -23,14 +23,14 @@
#include <QDir>
#include <QDebug>
ForgeXzDownload::ForgeXzDownload(QString relative_path, MetaEntryPtr entry) : NetAction()
ForgeXzDownload::ForgeXzDownload(QString url, QString relative_path, MetaEntryPtr entry) : NetAction()
{
m_entry = entry;
m_target_path = entry->getFullPath();
m_pack200_xz_file.setFileTemplate("./dl_temp.XXXXXX");
m_status = Job_NotStarted;
m_url_path = relative_path;
m_url = "https://files.minecraftforge.net/maven/" + m_url_path + ".pack.xz";
m_url = url + ".pack.xz";
}
void ForgeXzDownload::start()
@@ -35,10 +35,10 @@ class ForgeXzDownload : public NetAction
QString m_url_path;
public:
explicit ForgeXzDownload(QString relative_path, MetaEntryPtr entry);
static ForgeXzDownloadPtr make(QString relative_path, MetaEntryPtr entry)
explicit ForgeXzDownload(QString url, QString relative_path, MetaEntryPtr entry);
static ForgeXzDownloadPtr make(QString url, QString relative_path, MetaEntryPtr entry)
{
return ForgeXzDownloadPtr(new ForgeXzDownload(relative_path, entry));
return ForgeXzDownloadPtr(new ForgeXzDownload(url, relative_path, entry));
}
virtual ~ForgeXzDownload(){};
bool canAbort() override;

0 comments on commit 8a7f1e4

Please sign in to comment.