diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-26 19:20:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 19:20:39 +0200 |
commit | 940455f81cb0dee6e42b7b32a83d1f9e6560b05f (patch) | |
tree | 8fbcb356a2846ff6b8fcd471605f93144824c4cc | |
parent | 7f73e57c679944d5ee8574476f9cbffc9e344785 (diff) | |
parent | 938cae1130464fcedaa776d9f54898dece14f9a7 (diff) | |
download | PrismLauncher-940455f81cb0dee6e42b7b32a83d1f9e6560b05f.tar.gz PrismLauncher-940455f81cb0dee6e42b7b32a83d1f9e6560b05f.tar.bz2 PrismLauncher-940455f81cb0dee6e42b7b32a83d1f9e6560b05f.zip |
Merge pull request #645 from PolyMC/revert-609-feature/fix-blocked-modpacks
-rw-r--r-- | launcher/modplatform/flame/FlamePackIndex.cpp | 12 | ||||
-rw-r--r-- | launcher/modplatform/flame/FlamePackIndex.h | 1 |
2 files changed, 4 insertions, 9 deletions
diff --git a/launcher/modplatform/flame/FlamePackIndex.cpp b/launcher/modplatform/flame/FlamePackIndex.cpp index 6d48a3bf..bece7843 100644 --- a/launcher/modplatform/flame/FlamePackIndex.cpp +++ b/launcher/modplatform/flame/FlamePackIndex.cpp @@ -65,16 +65,12 @@ void Flame::loadIndexedPackVersions(Flame::IndexedPack& pack, QJsonArray& arr) // pick the latest version supported file.mcVersion = versionArray[0].toString(); file.version = Json::requireString(version, "displayName"); - file.fileName = Json::requireString(version, "fileName"); file.downloadUrl = Json::ensureString(version, "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).leftRef(4).toInt()) - ,QString::number(QString::number(file.fileId).rightRef(3).toInt()) - ,QUrl::toPercentEncoding(file.fileName)); + + // only add if we have a download URL (third party distribution is enabled) + if (!file.downloadUrl.isEmpty()) { + unsortedVersions.append(file); } - unsortedVersions.append(file); } auto orderSortPredicate = [](const IndexedVersion& a, const IndexedVersion& b) -> bool { return a.fileId > b.fileId; }; diff --git a/launcher/modplatform/flame/FlamePackIndex.h b/launcher/modplatform/flame/FlamePackIndex.h index a8bb15be..7ffa29c3 100644 --- a/launcher/modplatform/flame/FlamePackIndex.h +++ b/launcher/modplatform/flame/FlamePackIndex.h @@ -18,7 +18,6 @@ struct IndexedVersion { QString version; QString mcVersion; QString downloadUrl; - QString fileName; }; struct IndexedPack |