-
-
Notifications
You must be signed in to change notification settings - Fork 480
[GOG]: Switch to Galaxy way of loading library #2759
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
Conversation
additionally added releveant types
CacheStores now allow to enable temporal in-memory cache useful for many operations preventing IO blocking
This PR also removes duplicated |
currently it's only used in GOG games that don't support any content system (goodies). If game couldn't be found in products API it's assumed it's not installable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks cool, will do some testing
public/locales/en/gamepage.json
Outdated
@@ -133,6 +133,7 @@ | |||
}, | |||
"label": { | |||
"game": { | |||
"not-installable-game": "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a default text here.
@@ -80,7 +81,7 @@ export async function getExtraInfo(appName: string): Promise<ExtraInfo> { | |||
const extra: ExtraInfo = { | |||
about: gameInfo.extra?.about, | |||
reqs: await createReqsArray(appName, targetPlatform), | |||
storeUrl: gameInfo.store_url | |||
storeUrl: (await getGamesData(appName))?._links.store.href |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this works, nice. But I still think that we should solve promises before defining the values of this object, for both this and the previous key.
It is more readable and safer imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested here and everything looks good:
- List games
- Install
- Launch
- Uninstall
During the cache update, I got some missing/wrong information but then it updated it automatically after a few seconds. I think that is expected.
@imLinguin I think this one is fine to merge if you want to. |
Oh, yes |
This is a test of trying to replicate how GOG Galaxy loads the library.
We achieve this using galaxy-library endpoint which contains games from all connected integrations (updated by client), and GOG (updated internally). We filter out all the gog games and use those.
If we decided to go hardcore we could maybe support those integrations in the future in some way.
Of course this can be further extended in terms of caching and deciding whether to fetch new data for games.
One proposition is to verify if we have up to date data when opening the game page.
For now I'm marking it as wip (library pagination is still to be done)Additionally the galaxy-library endpoint provides us with certificates that somehow in pair with GOG access token allow us to get data from gamesdb that would return 404 otherwise.
Additionally I reduced IO traffic when pulling the library thanks to allowing to temporarily offload the CacheStore to memory, and then sync it to drive after all operations.
This PR also adds new field
installable
to GameInfo. Preventing Cannot get game info errors for goodie packs.Use the following Checklist if you have changed something on the Backend or Frontend: