diff --git a/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs b/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs index 99206df..5e41cc3 100644 --- a/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs +++ b/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs @@ -333,11 +333,18 @@ namespace LANCommander.PlaynitePlugin { if (args.Game.PluginId == Id) { - SaveController.Download(args.Game); - var gameId = Guid.Parse(args.Game.GameId); LANCommanderClient.StartPlaySession(gameId); + + try + { + SaveController.Download(args.Game); + } + catch (Exception ex) + { + Logger?.Error(ex, "Could not download save"); + } } } @@ -345,11 +352,18 @@ namespace LANCommander.PlaynitePlugin { if (args.Game.PluginId == Id) { - SaveController.Upload(args.Game); - var gameId = Guid.Parse(args.Game.GameId); LANCommanderClient.EndPlaySession(gameId); + + try + { + SaveController.Upload(args.Game); + } + catch (Exception ex) + { + Logger?.Error(ex, "Could not upload save"); + } } } diff --git a/LANCommander.SDK/Client.cs b/LANCommander.SDK/Client.cs index ae3be25..d299672 100644 --- a/LANCommander.SDK/Client.cs +++ b/LANCommander.SDK/Client.cs @@ -384,14 +384,14 @@ namespace LANCommander.SDK { Logger?.LogTrace("Starting a game session..."); - PostRequest($"/api/PlaySession/Start/{gameId}"); + PostRequest($"/api/PlaySessions/Start/{gameId}"); } public void EndPlaySession(Guid gameId) { Logger?.LogTrace("Ending a game session..."); - PostRequest($"/api/PlaySession/End/{gameId}"); + PostRequest($"/api/PlaySessions/End/{gameId}"); } private string GetMacAddress()