fix: handling around disabled mods

Don't update disabled mods to prevent mod duplication. Also, chop
filename in the metadata with a '.disabled'.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-06-20 08:55:35 -03:00
parent a7648d60ce
commit 5f75e531e6
5 changed files with 22 additions and 4 deletions

View File

@ -33,6 +33,11 @@ void ModrinthCheckUpdate::executeTask()
QStringList hashes;
auto best_hash_type = ProviderCaps.hashType(ModPlatform::Provider::MODRINTH).first();
for (auto mod : m_mods) {
if (!mod.enabled()) {
emit checkFailed(mod, tr("Disabled mods won't be updated, to prevent mod duplication issues!"));
continue;
}
auto hash = mod.metadata()->hash;
// Sadly the API can only handle one hash type per call, se we