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:
@ -455,6 +455,8 @@ void EnsureMetadataTask::modrinthCallback(ModPlatform::IndexedPack& pack, ModPla
|
||||
{
|
||||
// Prevent file name mismatch
|
||||
ver.fileName = mod.fileinfo().fileName();
|
||||
if (ver.fileName.endsWith(".disabled"))
|
||||
ver.fileName.chop(9);
|
||||
|
||||
QDir tmp_index_dir(m_index_dir);
|
||||
|
||||
@ -487,6 +489,8 @@ void EnsureMetadataTask::flameCallback(ModPlatform::IndexedPack& pack, ModPlatfo
|
||||
try {
|
||||
// Prevent file name mismatch
|
||||
ver.fileName = mod.fileinfo().fileName();
|
||||
if (ver.fileName.endsWith(".disabled"))
|
||||
ver.fileName.chop(9);
|
||||
|
||||
QDir tmp_index_dir(m_index_dir);
|
||||
|
||||
|
@ -118,6 +118,11 @@ void FlameCheckUpdate::executeTask()
|
||||
|
||||
int i = 0;
|
||||
for (auto mod : m_mods) {
|
||||
if (!mod.enabled()) {
|
||||
emit checkFailed(mod, tr("Disabled mods won't be updated, to prevent mod duplication issues!"));
|
||||
continue;
|
||||
}
|
||||
|
||||
setStatus(tr("Getting API response from CurseForge for '%1'").arg(mod.name()));
|
||||
setProgress(i++, m_mods.size());
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user