Fixed Version and NSFW fields to being saved

This commit is contained in:
erri120 2020-05-05 16:38:06 +02:00
parent 5d71fc4618
commit 9571ce03c6
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
3 changed files with 7 additions and 1 deletions

View File

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

View File

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

View File

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