Merge pull request #798 from erri120/modlist-properties-fixes

Fixed Version and NSFW fields to being saved
This commit is contained in:
Timothy Baldridge 2020-05-05 14:12:22 -06:00 committed by GitHub
commit b3b6182aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -326,6 +326,7 @@ namespace Wabbajack.Lib
Readme = ModlistReadme ?? "",
Image = ModListImage != default ? ModListImage.FileName : default,
Website = !string.IsNullOrWhiteSpace(ModListWebsite) ? new Uri(ModListWebsite) : null,
Version = ModlistVersion ?? new Version(1,0,0,0),
IsNSFW = ModlistIsNSFW
};

View File

@ -25,6 +25,8 @@ namespace Wabbajack.Lib
public long DownloadSize;
public long InstallSize;
public bool IsNSFW;
public List<Archive> Archives;
public Manifest(ModList modlist)
@ -43,6 +45,8 @@ namespace Wabbajack.Lib
DownloadSize = modlist.DownloadSize;
InstallSize = modlist.InstallSize;
IsNSFW = modlist.IsNSFW;
// meta is being omitted due to it being useless and not very space friendly
Archives = modlist.Archives.Select(a => new Archive(a.State)
{

View File

@ -188,7 +188,8 @@ namespace Wabbajack
ModListWebsite = ModlistSettings.Website,
ModlistReadme = ModlistSettings.Readme,
MO2DownloadsFolder = DownloadLocation.TargetPath,
ModlistVersion = ModlistSettings.Version
ModlistVersion = ModlistSettings.Version,
ModlistIsNSFW = ModlistSettings.IsNSFW
})
{
Parent.MWVM.Settings.Performance.AttachToBatchProcessor(ActiveCompilation);