aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/flame/FlameCheckUpdate.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-09-28 23:06:18 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-09-28 23:06:18 +0300
commit4802f6950e45d795303d3bc89d6f2e56293d2618 (patch)
tree3ba73bcdd89f278aaab6826e10c7c5659e5f71b6 /launcher/modplatform/flame/FlameCheckUpdate.cpp
parent5b7c5607a90cbb6ff78ba140a15d6180842d069b (diff)
parent531b58093eadba6bd856c4e30fb3b9a30dc270ee (diff)
downloadPrismLauncher-4802f6950e45d795303d3bc89d6f2e56293d2618.tar.gz
PrismLauncher-4802f6950e45d795303d3bc89d6f2e56293d2618.tar.bz2
PrismLauncher-4802f6950e45d795303d3bc89d6f2e56293d2618.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into feat/acknowledge_release_type
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/flame/FlameCheckUpdate.cpp')
-rw-r--r--launcher/modplatform/flame/FlameCheckUpdate.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/launcher/modplatform/flame/FlameCheckUpdate.cpp b/launcher/modplatform/flame/FlameCheckUpdate.cpp
index 023e26e4..c014863a 100644
--- a/launcher/modplatform/flame/FlameCheckUpdate.cpp
+++ b/launcher/modplatform/flame/FlameCheckUpdate.cpp
@@ -10,6 +10,7 @@
#include "ResourceDownloadTask.h"
#include "minecraft/mod/ModFolderModel.h"
+#include "minecraft/mod/tasks/GetModDependenciesTask.h"
#include "net/ApiDownload.h"
@@ -154,18 +155,17 @@ void FlameCheckUpdate::executeTask()
continue;
}
+ // Fake pack with the necessary info to pass to the download task :)
+ auto pack = std::make_shared<ModPlatform::IndexedPack>();
+ pack->name = mod->name();
+ pack->slug = mod->metadata()->slug;
+ pack->addonId = mod->metadata()->project_id;
+ pack->websiteUrl = mod->homeurl();
+ for (auto& author : mod->authors())
+ pack->authors.append({ author });
+ pack->description = mod->description();
+ pack->provider = ModPlatform::ResourceProvider::FLAME;
if (!latest_ver.hash.isEmpty() && (mod->metadata()->hash != latest_ver.hash || mod->status() == ModStatus::NotInstalled)) {
- // Fake pack with the necessary info to pass to the download task :)
- auto pack = std::make_shared<ModPlatform::IndexedPack>();
- pack->name = mod->name();
- pack->slug = mod->metadata()->slug;
- pack->addonId = mod->metadata()->project_id;
- pack->websiteUrl = mod->homeurl();
- for (auto& author : mod->authors())
- pack->authors.append({ author });
- pack->description = mod->description();
- pack->provider = ModPlatform::ResourceProvider::FLAME;
-
auto old_version = mod->version();
if (old_version.isEmpty() && mod->status() != ModStatus::NotInstalled) {
auto current_ver = getFileInfo(latest_ver.addonId.toInt(), mod->metadata()->file_id.toInt());
@@ -177,6 +177,7 @@ void FlameCheckUpdate::executeTask()
api.getModFileChangelog(latest_ver.addonId.toInt(), latest_ver.fileId.toInt()),
ModPlatform::ResourceProvider::FLAME, download_task);
}
+ m_deps.append(std::make_shared<GetModDependenciesTask::PackDependency>(pack, latest_ver));
}
emitSucceeded();