ludusavi: Fails to identify install folder with partially matching name

Related to #86 but probably needing a “different” approach.

GOG Linux native stores games in a folder structure like this:

$ find Brigador\ UpArmored\ Edition -maxdepth 1 -type d
Brigador UpArmored Edition
Brigador UpArmored Edition/game
Brigador UpArmored Edition/support
Brigador UpArmored Edition/docs

game contains the actual game installation where one can find goggame-NUMBER.hashdb, support and docs have some files helping GOG integrate into the Linux desktop. Note that for installed DLC there will be additional goggame-DLCNUMBER.hashdb files.

The base folder (e.g. Brigador UpArmored Edition) always has a file named gameinfo which includes the actual game name. Here is the gameinfo for Brigador:

Brigador: Up-Armored Edition
v1.65
56925
en-US
1356485086
1356485086
55584005483167404

So for games storing their configuration and/or saves within the <base> folder, I propose to look for gameinfo, take the first line and match that against the game name found in the ludusavi.manifest.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you for the fast fix, it works for me!

InstallDirRanking::get fetches a candidate and then does for other in self.0.values(). Once it finds an other with higher confidence, it returns none. Thats where it breaks.

Using the CLI, I filter for Brigador so there is no other and it returns Some correct value.

Using the UI there are many others, in my case it was “World of Goo” so it returns None.