diff options
Diffstat (limited to 'launcher/modplatform')
| -rw-r--r-- | launcher/modplatform/EnsureMetadataTask.cpp | 4 | ||||
| -rw-r--r-- | launcher/modplatform/flame/FlameCheckUpdate.cpp | 5 | ||||
| -rw-r--r-- | launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/launcher/modplatform/EnsureMetadataTask.cpp b/launcher/modplatform/EnsureMetadataTask.cpp index cf4e55b9..19e44ce0 100644 --- a/launcher/modplatform/EnsureMetadataTask.cpp +++ b/launcher/modplatform/EnsureMetadataTask.cpp @@ -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); diff --git a/launcher/modplatform/flame/FlameCheckUpdate.cpp b/launcher/modplatform/flame/FlameCheckUpdate.cpp index 3658bf8d..be12dee3 100644 --- a/launcher/modplatform/flame/FlameCheckUpdate.cpp +++ b/launcher/modplatform/flame/FlameCheckUpdate.cpp @@ -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()); diff --git a/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp b/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp index 78275cf0..5d936fec 100644 --- a/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp +++ b/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp @@ -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 |
