diff options
author | phit <2097483+phit@users.noreply.github.com> | 2021-03-24 19:44:26 +0100 |
---|---|---|
committer | phit <2097483+phit@users.noreply.github.com> | 2021-03-26 14:18:47 +0100 |
commit | ba13e33ccc5e86d3dfdcca34595309479727fa53 (patch) | |
tree | f2360a8bb750073015dbc6bda25f37c04627b175 /application | |
parent | 73af0f271adba6a4165e0ed36c9ae436f849f9c7 (diff) | |
download | PrismLauncher-ba13e33ccc5e86d3dfdcca34595309479727fa53.tar.gz PrismLauncher-ba13e33ccc5e86d3dfdcca34595309479727fa53.tar.bz2 PrismLauncher-ba13e33ccc5e86d3dfdcca34595309479727fa53.zip |
GH-3633 assume latest MC version, if CurseForge pack supports multiple
right now these are unused anyway
Diffstat (limited to 'application')
-rw-r--r-- | application/pages/modplatform/flame/FlameModel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/application/pages/modplatform/flame/FlameModel.cpp b/application/pages/modplatform/flame/FlameModel.cpp index cd3109e0..6d9dbda7 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(); |