From ba13e33ccc5e86d3dfdcca34595309479727fa53 Mon Sep 17 00:00:00 2001 From: phit <2097483+phit@users.noreply.github.com> Date: Wed, 24 Mar 2021 19:44:26 +0100 Subject: [PATCH] GH-3633 assume latest MC version, if CurseForge pack supports multiple right now these are unused anyway --- application/pages/modplatform/flame/FlameModel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/pages/modplatform/flame/FlameModel.cpp b/application/pages/modplatform/flame/FlameModel.cpp index cd3109e09..6d9dbda79 100644 --- a/application/pages/modplatform/flame/FlameModel.cpp +++ b/application/pages/modplatform/flame/FlameModel.cpp @@ -263,11 +263,12 @@ void Flame::ListModel::searchRequestFinished() } pack.latestFile.addonId = pack.addonId; pack.latestFile.fileId = id; - // FIXME: what to do when there's more than one, or there's no version? auto versionArray = file.value("gameVersion").toArray(); - if(versionArray.size() != 1) { + if(versionArray.size() < 1) { continue; } + + // pick the latest version supported pack.latestFile.mcVersion = versionArray[0].toString(); pack.latestFile.version = file.value("displayName").toString(); pack.latestFile.downloadUrl = file.value("downloadUrl").toString();