margorski / exodos-launcher

Launcher for eXoDOS. Basic and forked from Flashpoint Launcher repository (https://github.com/FlashpointProject/launcher)
https://exodos.the-eye.us
MIT License
35 stars 5 forks source link

Sync install state #17

Closed colin969 closed 6 months ago

colin969 commented 6 months ago

Currently the games install state fails to update when the installed folder is detected.

This uses a cheap workaround to properly find the newly installed game, then sends the game info to the frontend to force it to update.

Since state is held in BrowsePage, we force the current game to refresh regardless of what it is instead of trying to figure out if the changed game actually is the current game.

This also changes the installed games playlist to be blank, and create with a unique dummy filename. Instead of populating it with games, the filter function will use the installed flag on games to determine whether to include or not.

Games now check their install state immediately when they are parsed.

Uninstalling a game will not reflect the change in the current Installed Games browse page results until the playlist is un-selected then re-selected, but this is a fairly rare case. You'll never install a game when the playlist is open so the reverse doesn't occur.