aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/flame/FlameCheckUpdate.cpp
diff options
context:
space:
mode:
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();