diff --git a/RemoteDownloaderPlugin/Plugin.cs b/RemoteDownloaderPlugin/Plugin.cs index fa52267..36a20e8 100644 --- a/RemoteDownloaderPlugin/Plugin.cs +++ b/RemoteDownloaderPlugin/Plugin.cs @@ -65,12 +65,7 @@ public List GetGameCommands(IGame game) if (installedGame.IsEmu) { - commands.Add(new()); - commands.Add(new($"Base: {installedGame.InstalledContentTypes.Base}")); - commands.Add(new($"Update: {installedGame.InstalledContentTypes.Update}")); - commands.Add(new($"Dlc: {installedGame.InstalledContentTypes.Dlc}")); - commands.Add(new($"Extra: {installedGame.InstalledContentTypes.Extra}")); - commands.Add(new()); + commands.Add(new Command(installedGame.InstalledContentTypes.ToString())); } commands.Add(new Command("Uninstall", () => diff --git a/RemoteDownloaderPlugin/Store.cs b/RemoteDownloaderPlugin/Store.cs index 805f589..05d7eca 100644 --- a/RemoteDownloaderPlugin/Store.cs +++ b/RemoteDownloaderPlugin/Store.cs @@ -42,6 +42,15 @@ public void Add(string type) break; } } + + public override string ToString() + => "Content: " + string.Join(", ", new List() + { + (Base > 0) ? $"{Base} Base" : "", + (Update > 0) ? $"{Update} Update" : "", + (Dlc > 0) ? $"{Dlc} Dlc" : "", + (Extra > 0) ? $"{Extra} Extra" : "" + }.Where(x => !string.IsNullOrEmpty(x))); } public class InstalledEmuGame : IInstalledGame