summaryrefslogtreecommitdiff
path: root/src/installationmanager.cpp
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2019-02-01 00:36:44 -0600
committerSilarn <jrim@rimpo.org>2019-02-18 21:29:27 -0600
commit78ae7072c9a0ea3795dc0610b389e8e335f4eee6 (patch)
treea7dea13d0ef166feabdcfb58ca437aaeedf30f2c /src/installationmanager.cpp
parent7f56407b916f6ca204e72f25c01965441e0228b1 (diff)
Write the file category ID to the mod data when installing/updating
Diffstat (limited to 'src/installationmanager.cpp')
-rw-r--r--src/installationmanager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index 769394e7..b11f5667 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -561,7 +561,7 @@ bool InstallationManager::ensureValidModName(GuessedValue<QString> &name) const
bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString gameName, int modID,
const QString &version, const QString &newestVersion,
- int categoryID, const QString &repository)
+ int categoryID, int fileCategoryID, const QString &repository)
{
if (!ensureValidModName(modName)) {
return false;
@@ -641,6 +641,7 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString game
if (!settingsFile.contains("category")) {
settingsFile.setValue("category", QString::number(categoryID));
}
+ settingsFile.setValue("nexusFileStatus", fileCategoryID);
settingsFile.setValue("installationFile", m_CurrentFile);
settingsFile.setValue("repository", repository);
settingsFile.setValue("url", m_URL);
@@ -727,6 +728,7 @@ bool InstallationManager::install(const QString &fileName,
QString version = "";
QString newestVersion = "";
int categoryID = 0;
+ int fileCategoryID = 1;
QString repository = "Nexus";
QString metaName = fileName + ".meta";
@@ -745,6 +747,7 @@ bool InstallationManager::install(const QString &fileName,
metaFile.value("category", 0).toInt());
categoryID = CategoryFactory::instance().getCategoryID(categoryIndex);
repository = metaFile.value("repository", "").toString();
+ fileCategoryID = metaFile.value("fileCategory", 1).toInt();
}
if (version.isEmpty()) {
@@ -822,7 +825,7 @@ bool InstallationManager::install(const QString &fileName,
// the simple installer only prepares the installation, the rest
// works the same for all installers
if (!doInstall(modName, gameName, modID, version, newestVersion, categoryID,
- repository)) {
+ fileCategoryID, repository)) {
installResult = IPluginInstaller::RESULT_FAILED;
}
}