LemmusLemmus / GlosSI-Integration-Playnite

A Playnite extension that automates creating, launching and closing of GlosSI Steam shortcuts for your games.
GNU General Public License v3.0
27 stars 0 forks source link

Update notice on every Playnite startup #33

Closed LordBoos closed 2 months ago

LordBoos commented 2 months ago

Everytime I start Playnite, this update notice shows up. It there any way to disable it? It got quite annoying. image

LemmusLemmus commented 2 months ago

It should only ever appear once... I guess that pressing OK does not help? Does it result in some kind of error?

LordBoos commented 2 months ago

Pressing OK just closes the dialog, nothing else happens. Should I check some log files?

LemmusLemmus commented 2 months ago

Feel free to check (or upload recent parts of) extensions.log and playnite.log inside the Playnite directory.

When OK is pressed, normally a file called Targets.json is created in Playnite\ExtensionsData\6b0297da-75e5-4330-bb2d-b64bff22c315. You could check if the file exists there. The dialog only appears if that file does not exist, in which case pressing OK should, among other things, create the file. If the file does exist, you can verify that it contains {"Version":1}.

LordBoos commented 2 months ago

That file is not present, only DefaultTarget.json. extension.log contains only:

11-07 15:38:05.401|INFO |GlosSIIntegration#TargetsVersionMigrator:Migrating: Overwriting all target settings.
11-07 15:38:05.401|INFO |GlosSIIntegration#GlosSIIntegrationSettings:DefaultTarget file created.

playnite.log on the other hand contains error:

11-07 15:40:58.808|ERROR|ExtensionFactory:Failed to execute OnApplicationStarted method from GlosSI Integration plugin.
System.Exception: Failed to overwrite target settings! ---> System.ArgumentNullException: Hodnota nemůže být NULL.
Název parametru: path2
   v System.IO.Path.Combine(String path1, String path2)
   v Playnite.API.DatabaseAPI.GetFullFilePath(String databasePath) v C:\projects\playnite\source\Playnite\API\DatabaseAPI.cs:řádek 88
   v GlosSIIntegration.Models.PlayniteGameSteamAssets.GetPlayniteCoverPath() v C:\Build\Easter\Egg\Source\Models\PlayniteGameSteamAssets.cs:řádek 36
   v GlosSIIntegration.Models.PlayniteGameSteamAssets.SetFromPlayniteAssets(Boolean overwrite) v C:\Build\Easter\Egg\Source\Models\PlayniteGameSteamAssets.cs:řádek 50
   v GlosSIIntegration.Models.GlosSITargets.Files.GameGlosSITargetFile.Overwrite() v C:\Build\Easter\Egg\Source\Models\GlosSITargets\Files\GameGlosSITargetFile.cs:řádek 63
   v GlosSIIntegration.Models.TargetsVersionMigrator.OverwriteTargetSettings(GlobalProgressActionArgs progressBar, List`1 targets) v C:\Build\Easter\Egg\Source\Models\GlosSITargets\TargetsVersionMigrator.cs:řádek 91
   v GlosSIIntegration.Models.TargetsVersionMigrator.<>c__DisplayClass3_0.<MigrateOverwriteTargetSettings>b__0(GlobalProgressActionArgs progressBar) v C:\Build\Easter\Egg\Source\Models\GlosSITargets\TargetsVersionMigrator.cs:řádek 75
   v Playnite.ViewModels.ProgressViewViewModel.<>c__DisplayClass22_0.<ActivateProgress>b__0() v C:\projects\playnite\source\Playnite\ViewModels\ProgressViewViewModel.cs:řádek 91
   --- Konec trasování zásobníku pro vnitřní výjimku ---
   v GlosSIIntegration.Models.TargetsVersionMigrator.MigrateOverwriteTargetSettings(List`1 targetsToMigrate) v C:\Build\Easter\Egg\Source\Models\GlosSITargets\TargetsVersionMigrator.cs:řádek 83
   v GlosSIIntegration.Models.TargetsVersionMigrator.TryMigrate(Int32 lastVersion) v C:\Build\Easter\Egg\Source\Models\GlosSITargets\TargetsVersionMigrator.cs:řádek 38
   v GlosSIIntegration.Models.KnownTargets.LoadTargets() v C:\Build\Easter\Egg\Source\Models\GlosSITargets\KnownTargets.cs:řádek 25
   v GlosSIIntegration.Models.Overlays.OverlaySwitchingDecisionMaker.<>c.<.ctor>b__2_5(OnApplicationStartedEventArgs e) v C:\Build\Easter\Egg\Source\Models\Overlays\OverlaySwitchingDecisionMaker.cs:řádek 44
   v GlosSIIntegration.GlosSIIntegration.OnApplicationStarted(OnApplicationStartedEventArgs args) v C:\Build\Easter\Egg\Source\GlosSIIntegration.cs:řádek 225
   v Playnite.Plugins.ExtensionFactory.NotifiyOnApplicationStarted() v C:\projects\playnite\source\Playnite\Plugins\ExtensionFactory.cs:řádek 756

This is little weird, I do not have any folders "projects" or "Build" on my C:/ drive.

LemmusLemmus commented 2 months ago

Those folders/paths are on my machine (the machine that built it) :).

Thanks, that reveals the issue (unless there are more of them....)! I simply forgot to account for the possibility that a Playnite game may lack a cover image, and that apparently causes an exception. It should be easy enough to fix: I will release a new version as soon as possible. Once I do, you should hopefully only have to press OK one last time :).

This bug also affects "Add Integration" for games that lack a cover image...

Thanks a lot for reporting the bug!

LemmusLemmus commented 2 months ago

Check if the latest release fixes the issue!

LordBoos commented 2 months ago

It's now fixed, thank you for quick reaction!