include extras

This commit is contained in:
2024-06-20 22:34:38 +02:00
parent 4ea4a70e50
commit 3be25d7070
6 changed files with 33 additions and 20 deletions

View File

@@ -39,10 +39,13 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
public async Task<UpdateCheckResult> Check(UpdateCheckOptions options)
{
var result = new UpdateCheckResult();
var hasConfig = modpackInfo.Exists;
InstallInfos installInfos = null;
UpdateInfos updateInfos = null;
var hasConfig = modpackInfo.Exists;
var result = new UpdateCheckResult
{
HasExtras = options.IncludeExtraActions
};
if (updateConfig.Maintenance && !options.IgnoreMaintenance)
{
@@ -174,6 +177,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
// Save new modpack info
modpackInfo.Version = checkResult.LatestVersion;
modpackInfo.ConfigUrl = updateConfig.ConfigUrl;
modpackInfo.IncludeExtras = checkResult.HasExtras;
modpackInfo.Save();
// Delete cached zip files

View File

@@ -11,4 +11,5 @@ public class UpdateCheckResult
public bool HasError { get; set; }
public bool IsInMaintenance { get; set; }
public bool HasUpdates => !IsInstalled || CurrentVersion < LatestVersion;
public bool HasExtras { get; set; }
}