From 089d4d0829b0f16942dd20c7e435c352c0e7e052 Mon Sep 17 00:00:00 2001 From: azuravian Date: Sat, 16 Nov 2024 03:27:10 -0500 Subject: [PATCH] Update yaml --- LocalLibrary.cs | 21 +++++++++++++++------ extension.yaml | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/LocalLibrary.cs b/LocalLibrary.cs index 69fc10f..f302b61 100644 --- a/LocalLibrary.cs +++ b/LocalLibrary.cs @@ -470,11 +470,11 @@ public void GameInstaller(Game game, LocalInstallController install) } if (Settings.Settings.UseActions && gameActions.Count > 0) { - Install_Extras(gameActions, selectedGame, install); + failed = Install_Extras(gameActions, selectedGame, install); } else if (!Settings.Settings.UseActions && gameRoms.Count > 0) { - Install_Extras(gameRoms, selectedGame, install); + failed = Install_Extras(gameRoms, selectedGame, install); } if (!failed) { @@ -505,8 +505,9 @@ private void Delete_PlayActions(IEnumerable actions, Game selectedGa } } - public void Install_Extras(List extras, Game selectedGame, LocalInstallController install) + public bool Install_Extras(List extras, Game selectedGame, LocalInstallController install) { + var failed = false; foreach (GameRom extra in extras) { int code = 0; @@ -514,6 +515,7 @@ public void Install_Extras(List extras, Game selectedGame, LocalInstall string command = null; string extraInstallArgs = null; var extraPath = extra.Path; + if (Path.GetFileName(extraPath).EndsWith(".exe")) { command = extraPath; @@ -552,14 +554,18 @@ public void Install_Extras(List extras, Game selectedGame, LocalInstall selectedGame.IsInstalled = false; API.Instance.Database.Games.Update(selectedGame); install.Dispose(); - return; + return true; } + failed = false; } + failed = false; } + return failed; } - public void Install_Extras(List extras, Game selectedGame, LocalInstallController install) + public bool Install_Extras(List extras, Game selectedGame, LocalInstallController install) { + var failed = false; foreach (GameAction extra in extras) { int code = 0; @@ -605,10 +611,13 @@ public void Install_Extras(List extras, Game selectedGame, LocalInst selectedGame.IsInstalled = false; API.Instance.Database.Games.Update(selectedGame); install.Dispose(); - return; + return true; } + failed = false; } + failed = false; } + return failed; } public void GameUninstaller(Game game, LocalUninstallController uninstall) diff --git a/extension.yaml b/extension.yaml index 81aadfb..b5d9b2a 100644 --- a/extension.yaml +++ b/extension.yaml @@ -1,7 +1,7 @@ Id: LocalLibrary_2d01017d-024e-444d-80d3-f62f5be3fca5 Name: Local Library Author: Azuravian -Version: 1.0.0 +Version: 1.0.1 Module: LocalLibrary.dll Type: GameLibrary Icon: icon.png