Generalise resource metadata

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2023-08-31 17:32:55 +01:00
parent b83fdbd1b7
commit 93876e27f8
28 changed files with 209 additions and 370 deletions

View File

@ -154,7 +154,7 @@ void FlameCheckUpdate::executeTask()
continue;
}
if (!latest_ver.hash.isEmpty() && (mod->metadata()->hash != latest_ver.hash || mod->status() == ModStatus::NotInstalled)) {
if (!latest_ver.hash.isEmpty() && (mod->metadata()->hash != latest_ver.hash || mod->status() == ResourceStatus::NOT_INSTALLED)) {
// Fake pack with the necessary info to pass to the download task :)
auto pack = std::make_shared<ModPlatform::IndexedPack>();
pack->name = mod->name();
@ -167,7 +167,7 @@ void FlameCheckUpdate::executeTask()
pack->provider = ModPlatform::ResourceProvider::FLAME;
auto old_version = mod->version();
if (old_version.isEmpty() && mod->status() != ModStatus::NotInstalled) {
if (old_version.isEmpty() && mod->status() != ResourceStatus::NOT_INSTALLED) {
auto current_ver = getFileInfo(latest_ver.addonId.toInt(), mod->metadata()->file_id.toInt());
old_version = current_ver.version;
}