summaryrefslogtreecommitdiffstats
path: root/logic/OneSixUpdate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-09-30 02:34:46 +0200
committerPetr Mrázek <peterix@gmail.com>2013-09-30 02:34:46 +0200
commit8b0f8b9e597eb50ff9323037fd5fa1b9e330c467 (patch)
tree3b6613d6c7672803c371ef7043cf35b713b975b1 /logic/OneSixUpdate.cpp
parent604162acdf5283a9759c1b3ce9e90887a6599ce7 (diff)
downloadMultiMC-8b0f8b9e597eb50ff9323037fd5fa1b9e330c467.tar
MultiMC-8b0f8b9e597eb50ff9323037fd5fa1b9e330c467.tar.gz
MultiMC-8b0f8b9e597eb50ff9323037fd5fa1b9e330c467.tar.lz
MultiMC-8b0f8b9e597eb50ff9323037fd5fa1b9e330c467.tar.xz
MultiMC-8b0f8b9e597eb50ff9323037fd5fa1b9e330c467.zip
``Working'' forge unpackers. Needs a lot of hardening but good for alpha.
Diffstat (limited to 'logic/OneSixUpdate.cpp')
-rw-r--r--logic/OneSixUpdate.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp
index 73bd9403..41d8f599 100644
--- a/logic/OneSixUpdate.cpp
+++ b/logic/OneSixUpdate.cpp
@@ -75,7 +75,7 @@ void OneSixUpdate::versionFileStart()
QString urlstr("http://s3.amazonaws.com/Minecraft.Download/versions/");
urlstr += targetVersion->descriptor() + "/" + targetVersion->descriptor() + ".json";
auto job = new DownloadJob("Version index");
- job->add(QUrl(urlstr));
+ job->addByteArrayDownload(QUrl(urlstr));
specificVersionDownloadJob.reset(job);
connect(specificVersionDownloadJob.data(), SIGNAL(succeeded()),
SLOT(versionFileFinished()));
@@ -158,7 +158,7 @@ void OneSixUpdate::jarlibStart()
targetstr += version->id + "/" + version->id + ".jar";
auto job = new DownloadJob("Libraries for instance " + inst->name());
- job->add(QUrl(urlstr), targetstr);
+ job->addFileDownload(QUrl(urlstr), targetstr);
jarlibDownloadJob.reset(job);
auto libs = version->getActiveNativeLibs();
@@ -171,7 +171,10 @@ void OneSixUpdate::jarlibStart()
auto entry = metacache->resolveEntry("libraries", lib->storagePath());
if (entry->stale)
{
- jarlibDownloadJob->add(download_path, entry);
+ if(lib->hint() == "forge-pack-xz")
+ jarlibDownloadJob->addForgeXzDownload(download_path, entry);
+ else
+ jarlibDownloadJob->addCacheDownload(download_path, entry);
}
}
connect(jarlibDownloadJob.data(), SIGNAL(succeeded()), SLOT(jarlibFinished()));