mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 05:16:59 +03:00
[Backport release-10.x] Make Minecraft resource URL override consistent with other overrides (#4877)
This commit is contained in:
commit
a9a15a20ef
5 changed files with 21 additions and 7 deletions
|
|
@ -73,7 +73,7 @@ void AssetUpdateTask::assetIndexFinished()
|
|||
|
||||
auto job = index.getDownloadJob();
|
||||
if (job) {
|
||||
QString resourceURL = APPLICATION->settings()->get("ResourceURL").toString();
|
||||
QString resourceURL = resourceUrl();
|
||||
QString source = tr("Mojang");
|
||||
if (resourceURL != BuildConfig.DEFAULT_RESOURCE_BASE) {
|
||||
source = QUrl(resourceURL).host();
|
||||
|
|
@ -111,3 +111,12 @@ bool AssetUpdateTask::abort()
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
QString AssetUpdateTask::resourceUrl()
|
||||
{
|
||||
if (const QString urlOverride = APPLICATION->settings()->get("ResourceURLOverride").toString(); !urlOverride.isEmpty()) {
|
||||
return urlOverride;
|
||||
}
|
||||
|
||||
return BuildConfig.DEFAULT_RESOURCE_BASE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue