diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-30 02:34:46 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-30 02:34:46 +0200 |
commit | 8b0f8b9e597eb50ff9323037fd5fa1b9e330c467 (patch) | |
tree | 3b6613d6c7672803c371ef7043cf35b713b975b1 /logic/OneSixUpdate.cpp | |
parent | 604162acdf5283a9759c1b3ce9e90887a6599ce7 (diff) | |
download | MultiMC-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.cpp | 9 |
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())); |