Skip to content

Commit

Permalink
Update yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
azuravian committed Nov 16, 2024
1 parent 5320ffc commit 089d4d0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
21 changes: 15 additions & 6 deletions LocalLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -505,15 +505,17 @@ private void Delete_PlayActions(IEnumerable<GameAction> actions, Game selectedGa
}
}

public void Install_Extras(List<GameRom> extras, Game selectedGame, LocalInstallController install)
public bool Install_Extras(List<GameRom> extras, Game selectedGame, LocalInstallController install)
{
var failed = false;
foreach (GameRom extra in extras)
{
int code = 0;
string exce = "";
string command = null;
string extraInstallArgs = null;
var extraPath = extra.Path;

if (Path.GetFileName(extraPath).EndsWith(".exe"))
{
command = extraPath;
Expand Down Expand Up @@ -552,14 +554,18 @@ public void Install_Extras(List<GameRom> 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<GameAction> extras, Game selectedGame, LocalInstallController install)
public bool Install_Extras(List<GameAction> extras, Game selectedGame, LocalInstallController install)
{
var failed = false;
foreach (GameAction extra in extras)
{
int code = 0;
Expand Down Expand Up @@ -605,10 +611,13 @@ public void Install_Extras(List<GameAction> 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)
Expand Down
2 changes: 1 addition & 1 deletion extension.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 089d4d0

Please sign in to comment.