feat: add ability to change assets download server
Signed-off-by: clague <93119153+clague@users.noreply.github.com>
This commit is contained in:
parent
2c91629564
commit
4bf6e59f3b
6 changed files with 73 additions and 3 deletions
|
@ -71,7 +71,15 @@ void AssetUpdateTask::assetIndexFinished()
|
|||
|
||||
auto job = index.getDownloadJob();
|
||||
if (job) {
|
||||
setStatus(tr("Getting the assets files from Mojang..."));
|
||||
QString resourceURLRaw;
|
||||
auto statusText = tr("Getting the assets files from Mojang...");
|
||||
resourceURLRaw = APPLICATION->settings()->get("ResourceURLOverride").toString();
|
||||
// FIXME: Need translation
|
||||
if (!resourceURLRaw.isEmpty()) {
|
||||
QUrl resourceURL = QUrl(resourceURLRaw);
|
||||
statusText.replace("Mojang", resourceURL.host());
|
||||
}
|
||||
setStatus(statusText);
|
||||
downloadJob = job;
|
||||
connect(downloadJob.get(), &NetJob::succeeded, this, &AssetUpdateTask::emitSucceeded);
|
||||
connect(downloadJob.get(), &NetJob::failed, this, &AssetUpdateTask::assetsFailed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue