The PR adds a dialog that can be used to filter the games library based on game categories. Enabling one category filters shows only games matching the selected category, while enabling multiple category filters shows games matching any of the selected categories.
The games and associated categories are stored on disk in the user's cache directory to allow for filtering in offline mode. Once the client goes online again, the file will be updated with any new games and categories found.
Note that this solution uses the category field as returned by the call to embed.gog.com/account/getFilteredProducts and not the genres field as returned by the call to gamesdb.gog.com/platforms/gog/external_releases. This is because the former requires only a single API call, while the latter initially requires one API call per game in the library.
Searching for categories, as proposed in the issue, was left out as the total number of categories was low (8 in total).
The PR also replaces all print statements with the logger library for ease of debugging.
Checklist
[x] CHANGELOG.md was updated (format: - Change made (thanks to github_username))
Description
This PR addresses issue #543.
The PR adds a dialog that can be used to filter the games library based on game categories. Enabling one category filters shows only games matching the selected category, while enabling multiple category filters shows games matching any of the selected categories. The games and associated categories are stored on disk in the user's cache directory to allow for filtering in offline mode. Once the client goes online again, the file will be updated with any new games and categories found.
Note that this solution uses the
category
field as returned by the call toembed.gog.com/account/getFilteredProducts
and not thegenres
field as returned by the call togamesdb.gog.com/platforms/gog/external_releases
. This is because the former requires only a single API call, while the latter initially requires one API call per game in the library.Searching for categories, as proposed in the issue, was left out as the total number of categories was low (8 in total).
The PR also replaces all print statements with the logger library for ease of debugging.
Checklist