diff --git a/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs b/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs index e6edf185..a9c6895f 100644 --- a/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs +++ b/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs @@ -6,6 +6,7 @@ using System.Net.Http; using System.Text; using System.Threading.Tasks; using System.Windows.Media.Imaging; +using CommonMark.Syntax; using Newtonsoft.Json; using Wabbajack.Common; using Wabbajack.Lib.Downloaders; @@ -31,6 +32,9 @@ namespace Wabbajack.Lib.ModListRegistry [JsonProperty("game")] public Game Game { get; set; } + [JsonIgnore] + public string GameName { get; set; } + [JsonProperty("official")] public bool Official { get; set; } @@ -75,9 +79,16 @@ namespace Wabbajack.Lib.ModListRegistry public static List LoadFromGithub() { var client = new HttpClient(); - Utils.Log("Loading Modlists from Github"); + Utils.Log("Loading ModLists from Github"); var result = client.GetStringSync(Consts.ModlistMetadataURL); - return result.FromJSONString>(); + var list = result.FromJSONString>(); + list.Do(m => + { + m.GameName = m.Game.ToDescriptionString(); + if (string.IsNullOrWhiteSpace(m.GameName)) + m.GameName = m.Game.ToString(); + }); + return list; } public bool NeedsDownload(string modlistPath) diff --git a/Wabbajack/Views/ModeSelectionWindow.xaml b/Wabbajack/Views/ModeSelectionWindow.xaml index 057eaf8f..37364ec8 100644 --- a/Wabbajack/Views/ModeSelectionWindow.xaml +++ b/Wabbajack/Views/ModeSelectionWindow.xaml @@ -97,7 +97,7 @@ Grid.Row="1" Grid.Column="4" HorizontalAlignment="Right" - Text="{Binding Game}" + Text="{Binding GameName}" TextAlignment="Right" />