From b1408775b367716b3e730504a8f41556125a9c36 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Mon, 22 Dec 2025 19:55:47 +0200 Subject: [PATCH] fix Pre-release filter introduced here https://github.com/PrismLauncher/PrismLauncher/pull/3260 fixes #4415 reason: some snapshot have Pre-Release in our meta but when searching in Modrinth this needs to be translated to -pre and the reverse needed to be done for filtering after we fetched the version. Now there are snapshots with -pre in name and that works with Modrinth but when we translate it back we replace it with Pre-Release so the easeiest patch is just to double the version(one with -pre one with Pre-Release) The correct one would be to complicate the code and identify the versions that need the transition and only apply this for those. Signed-off-by: Trial97 --- launcher/modplatform/modrinth/ModrinthPackIndex.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp index 128c7856b..699e12b40 100644 --- a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp +++ b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp @@ -126,7 +126,8 @@ ModPlatform::IndexedVersion Modrinth::loadIndexedPackVersion(QJsonObject& obj, Q return {}; } for (auto mcVer : versionArray) { - file.mcVersion.append(ModrinthAPI::mapMCVersionFromModrinth(mcVer.toString())); + file.mcVersion.append({ ModrinthAPI::mapMCVersionFromModrinth(mcVer.toString()), + mcVer.toString() }); // double this so we can check both strings when filtering } auto loaders = Json::requireArray(obj, "loaders"); for (auto loader : loaders) {