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 <alexandru.tripon97@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user