aboutsummaryrefslogtreecommitdiff
path: root/launcher/ModDownloadTask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ModDownloadTask.cpp')
-rw-r--r--launcher/ModDownloadTask.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/launcher/ModDownloadTask.cpp b/launcher/ModDownloadTask.cpp
index 301b6637..41856fb5 100644
--- a/launcher/ModDownloadTask.cpp
+++ b/launcher/ModDownloadTask.cpp
@@ -2,6 +2,7 @@
/*
* PolyMC - Minecraft Launcher
* Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
+* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,12 +22,14 @@
#include "Application.h"
#include "minecraft/mod/ModFolderModel.h"
-ModDownloadTask::ModDownloadTask(ModPlatform::IndexedPack mod, ModPlatform::IndexedVersion version, const std::shared_ptr<ModFolderModel> mods)
+ModDownloadTask::ModDownloadTask(ModPlatform::IndexedPack mod, ModPlatform::IndexedVersion version, const std::shared_ptr<ModFolderModel> mods, bool is_indexed)
: m_mod(mod), m_mod_version(version), mods(mods)
{
- m_update_task.reset(new LocalModUpdateTask(mods->indexDir(), m_mod, m_mod_version));
+ if (is_indexed) {
+ m_update_task.reset(new LocalModUpdateTask(mods->indexDir(), m_mod, m_mod_version));
- addTask(m_update_task);
+ addTask(m_update_task);
+ }
m_filesNetJob.reset(new NetJob(tr("Mod download"), APPLICATION->network()));
m_filesNetJob->setStatus(tr("Downloading mod:\n%1").arg(m_mod_version.downloadUrl));