Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game list order changes after fetching games list from the API #564

Open
LeXofLeviafan opened this issue Mar 23, 2023 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@LeXofLeviafan
Copy link
Contributor

A few months ago I've installed several games from the DROD series. I haven't been playing them for a while, but after I started I've noticed that the order they're placed in initially gets changed after a few seconds. This causes usage problems; i.e. if I'm trying to run a game, I click "play" on one of the games, but it switches out the game tile under my cursor so a different game loads up instead.

It seems that the name was changed in the API for some games since I've installed them; so the initial order they're placed in goes like this:

DROD RPG: Tendry's Tale
DROD: Gunthro and the Epic Blunder
DROD: Journey to Rooted Hold
DROD: King Dugan's Dungeon
DROD: The City Beneath
DROD: The Second Sky

…and after fetching API data they get ordered like this:

DROD 2: Journey to Rooted Hold
DROD 3: The City Beneath
DROD 4: Gunthro and the Epic Blunder
DROD RPG: Tendry's Tale
DROD: King Dugan's Dungeon
DROD: The Second Sky

The first version of the name appears to be taken from the ./gameinfo file contained in the game folder. I suggest detecting when the name fetched in the API differs from the old one, and updating the metadata file so that the initial tile ordering is correct on the next startup.

@sharkwouter
Copy link
Owner

That is odd. When did you install them? If they were installed with the latest version of Minigalaxy, this should not happen, but it would be good to test that. If you reinstall one or two of them, does that change the behavior for these specific ones?

@LeXofLeviafan
Copy link
Contributor Author

…Like I said: the initial ordering is controlled by the contents of ./gameinfo, and GOG can change the name in the API at any time; so if the name in the API was changed after the game was installed, Minigalaxy doesn't update the respective ./gameinfo file, thus causing discrepancy in the sorting order.

And yes, I'm running the latest release (1.2.2).

@LeXofLeviafan
Copy link
Contributor Author

LeXofLeviafan commented Mar 24, 2023

As for your question: reinstalling the game does not help – after the game is installed, the ./gameinfo contains the old name (not the one from the API). Perhaps it's taken from the installer instead? Although it hardly matters – updating the name at install time only wouldn't prevent the issue from resurfacing once an already installed game has its name changed in the API.

(Also the tile is still dimmed after the install, and the sorting position isn't moved into the installed games list… until the app restart, that is.)

@sharkwouter
Copy link
Owner

Oh, that makes sense. So what you're saying is that the name in the gameinfo file should be updated when the api is polled. Got it.

@sharkwouter sharkwouter added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants