diff options
author | Petr Mrázek <peterix@users.noreply.github.com> | 2021-03-26 20:36:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-26 20:36:00 +0000 |
commit | 9d76219434d3d14d63a3cf8a0ee216f8198a29a2 (patch) | |
tree | f2360a8bb750073015dbc6bda25f37c04627b175 /application/pages/modplatform/flame | |
parent | 73af0f271adba6a4165e0ed36c9ae436f849f9c7 (diff) | |
parent | ba13e33ccc5e86d3dfdcca34595309479727fa53 (diff) | |
download | PrismLauncher-9d76219434d3d14d63a3cf8a0ee216f8198a29a2.tar.gz PrismLauncher-9d76219434d3d14d63a3cf8a0ee216f8198a29a2.tar.bz2 PrismLauncher-9d76219434d3d14d63a3cf8a0ee216f8198a29a2.zip |
Merge pull request #3686 from phit/fix/3633
GH-3633 assume latest MC version, if CurseForge pack supports multiple
Diffstat (limited to 'application/pages/modplatform/flame')
-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(); |