diff options
author | Sky <git@bunnies.cc> | 2013-12-13 14:58:11 +0000 |
---|---|---|
committer | Sky <git@bunnies.cc> | 2013-12-13 14:58:11 +0000 |
commit | 979946b7bb2cec808198f9194169ea08cce8bb00 (patch) | |
tree | 76db4173a0f896b7accfcdf8bb8a7dd143525922 /logic/OneSixUpdate.cpp | |
parent | 808ca763632090abdab5a2451c95dbb0f4319126 (diff) | |
download | MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar.gz MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar.lz MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar.xz MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.zip |
First sweep moving URLs to a constants file
Diffstat (limited to 'logic/OneSixUpdate.cpp')
-rw-r--r-- | logic/OneSixUpdate.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp index 39064de8..4228fc44 100644 --- a/logic/OneSixUpdate.cpp +++ b/logic/OneSixUpdate.cpp @@ -29,6 +29,7 @@ #include "OneSixLibrary.h" #include "OneSixInstance.h" #include "net/ForgeMirrors.h" +#include "net/URLConstants.h" #include "assets/AssetsUtils.h" #include "pathutils.h" @@ -131,8 +132,7 @@ void OneSixUpdate::versionFileStart() QLOG_INFO() << m_inst->name() << ": getting version file."; setStatus("Getting the version files from Mojang."); - QString urlstr("http://s3.amazonaws.com/Minecraft.Download/versions/"); - urlstr += targetVersion->descriptor() + "/" + targetVersion->descriptor() + ".json"; + QString urlstr = "http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + targetVersion->descriptor() + "/" + targetVersion->descriptor() + ".json"; auto job = new NetJob("Version index"); job->addNetAction(ByteArrayDownload::make(QUrl(urlstr))); specificVersionDownloadJob.reset(job); @@ -202,7 +202,7 @@ void OneSixUpdate::assetIndexStart() OneSixInstance *inst = (OneSixInstance *)m_inst; std::shared_ptr<OneSixVersion> version = inst->getFullVersion(); QString assetName = version->assets; - QUrl indexUrl("http://s3.amazonaws.com/Minecraft.Download/indexes/" + assetName + ".json"); + QUrl indexUrl = "http://" + URLConstants::AWS_DOWNLOAD_INDEXES + assetName + ".json"; QString localPath = assetName + ".json"; auto job = new NetJob("Asset index for " + inst->name()); @@ -241,7 +241,7 @@ void OneSixUpdate::assetIndexFinished() if ((!objectFile.isFile()) || (objectFile.size() != object.size)) { auto objectDL = MD5EtagDownload::make( - QUrl("http://resources.download.minecraft.net/" + objectName), + QUrl("http://" + URLConstants::RESOURCE_BASE + objectName), objectFile.filePath()); dls.append(objectDL); } @@ -298,7 +298,7 @@ void OneSixUpdate::jarlibStart() { QString version_id = version->id; QString localPath = version_id + "/" + version_id + ".jar"; - QString urlstr = "http://s3.amazonaws.com/Minecraft.Download/versions/" + localPath; + QString urlstr = "http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + localPath; auto job = new NetJob("Libraries for instance " + inst->name()); |