aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/flame/FlameModIndex.cpp
diff options
context:
space:
mode:
authorRyan Cao <70191398+ryanccn@users.noreply.github.com>2022-05-28 21:15:00 +0800
committerGitHub <noreply@github.com>2022-05-28 21:15:00 +0800
commit2be8100e7cb625f3e6356a68f20291c5aa327c02 (patch)
treeeaf364705154e0457a1bde40dff8b2c8d843c8e5 /launcher/modplatform/flame/FlameModIndex.cpp
parent6d0ea13f97570f837f11022e3ef0fbfb6d0482f5 (diff)
parent3ff26d5cfe293c635655d35e96d093ef0b383dc2 (diff)
downloadPrismLauncher-2be8100e7cb625f3e6356a68f20291c5aa327c02.tar.gz
PrismLauncher-2be8100e7cb625f3e6356a68f20291c5aa327c02.tar.bz2
PrismLauncher-2be8100e7cb625f3e6356a68f20291c5aa327c02.zip
Merge branch 'develop' into global-jvm-args
Diffstat (limited to 'launcher/modplatform/flame/FlameModIndex.cpp')
-rw-r--r--launcher/modplatform/flame/FlameModIndex.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/launcher/modplatform/flame/FlameModIndex.cpp b/launcher/modplatform/flame/FlameModIndex.cpp
index 9846b156..ba0824cf 100644
--- a/launcher/modplatform/flame/FlameModIndex.cpp
+++ b/launcher/modplatform/flame/FlameModIndex.cpp
@@ -56,15 +56,8 @@ void FlameMod::loadIndexedPackVersions(ModPlatform::IndexedPack& pack,
file.fileId = Json::requireInteger(obj, "id");
file.date = Json::requireString(obj, "fileDate");
file.version = Json::requireString(obj, "displayName");
+ file.downloadUrl = Json::requireString(obj, "downloadUrl");
file.fileName = Json::requireString(obj, "fileName");
- file.downloadUrl = Json::ensureString(obj, "downloadUrl", "");
- if(file.downloadUrl.isEmpty()){
- //FIXME : HACK, MAY NOT WORK FOR LONG
- file.downloadUrl = QString("https://media.forgecdn.net/files/%1/%2/%3")
- .arg(QString::number(QString::number(file.fileId.toInt()).leftRef(4).toInt())
- ,QString::number(QString::number(file.fileId.toInt()).rightRef(3).toInt())
- ,QUrl::toPercentEncoding(file.fileName));
- }
unsortedVersions.append(file);
}