From 66a46556ddeb7b8dbc061d325b55364839a86a26 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 16 Jul 2014 23:18:02 +0300 Subject: Move mirrors for get client version into branding file. New branding options: updateMirrorX where X is from 1 to 7. --- src/gui/windows/updaterwindow.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/gui/windows') diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 4c1a94a13..e2c1b6128 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -560,15 +560,16 @@ void UpdaterWindow::download() if (mDownloadStatus == UPDATE_PATCH) { mDownload = new Net::Download(this, - "http://manaplus.org/update/" + mCurrentFile, + branding.getStringValue("updateMirror1") + mCurrentFile, &updateProgress, true, false, mValidateXml); - mDownload->addMirror("http://www.manaplus.org/update/" - + mCurrentFile); - mDownload->addMirror("http://www2.manaplus.org/update/" - + mCurrentFile); - mDownload->addMirror("http://www3.manaplus.org/update/" - + mCurrentFile); + for (int f = 2; f < 8; f ++) + { + const std::string url = branding.getStringValue( + "updateMirror" + toString(f)); + if (!url.empty()) + mDownload->addMirror(url + mCurrentFile); + } } else { -- cgit v1.2.3-70-g09d2