aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/modrinth
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-06-20 08:55:35 -0300
committerflow <flowlnlnln@gmail.com>2022-07-17 11:33:43 -0300
commit5f75e531e61e1f2cb5d602e084e9a0ddd1c85a5c (patch)
treeb6daf3f8a33d0718851cb3337f0f6e9674cb24c5 /launcher/modplatform/modrinth
parenta7648d60ce1d1567cd1c878aaa55dae3696a0210 (diff)
downloadPrismLauncher-5f75e531e61e1f2cb5d602e084e9a0ddd1c85a5c.tar.gz
PrismLauncher-5f75e531e61e1f2cb5d602e084e9a0ddd1c85a5c.tar.bz2
PrismLauncher-5f75e531e61e1f2cb5d602e084e9a0ddd1c85a5c.zip
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>
Diffstat (limited to 'launcher/modplatform/modrinth')
-rw-r--r--launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp5
1 files changed, 5 insertions, 0 deletions
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