mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
base list name off of Machine Link
This commit is contained in:
parent
759259cb8a
commit
a5c937a59f
@ -26,6 +26,7 @@ namespace Wabbajack.CacheServer
|
||||
public List<(Archive archive, bool)> Archives { get; set; }
|
||||
public DownloadMetadata DownloadMetaData { get; set; }
|
||||
public bool HasFailures { get; set; }
|
||||
public string MachineName { get; set; }
|
||||
}
|
||||
|
||||
public static Dictionary<string, ModListStatus> ModLists { get; set; }
|
||||
@ -42,6 +43,7 @@ namespace Wabbajack.CacheServer
|
||||
var summaries = ModLists.Values.Select(m => new ModlistSummary
|
||||
{
|
||||
Name = m.Name,
|
||||
MachineName = m.MachineName,
|
||||
Checked = m.Checked,
|
||||
Failed = m.Archives.Count(a => a.Item2),
|
||||
Passed = m.Archives.Count(a => !a.Item2),
|
||||
@ -190,12 +192,14 @@ namespace Wabbajack.CacheServer
|
||||
|
||||
var status = new ModListStatus
|
||||
{
|
||||
Name = list.Title,
|
||||
Name = list.Title,
|
||||
MachineName = list.Links.MachineURL,
|
||||
Archives = validated.OrderBy(v => v.archive.Name).ToList(),
|
||||
DownloadMetaData = list.DownloadMetadata,
|
||||
HasFailures = validated.Any(v => v.is_failed)
|
||||
};
|
||||
|
||||
statuses.Add(status.MachineName, status);
|
||||
statuses.Add(status.Name, status);
|
||||
}
|
||||
}
|
||||
|
@ -110,11 +110,12 @@ namespace Wabbajack.Lib.ModListRegistry
|
||||
public class ModlistSummary
|
||||
{
|
||||
public string Name;
|
||||
public string MachineName;
|
||||
public DateTime Checked;
|
||||
public int Failed;
|
||||
public int Passed;
|
||||
public string Link => $"/lists/status/{Name}.json";
|
||||
public string Report => $"/lists/status/{Name}.html";
|
||||
public string Link => $"/lists/status/{MachineName}.json";
|
||||
public string Report => $"/lists/status/{MachineName}.html";
|
||||
public bool HasFailures => Failed > 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user