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

[GOG] Retry GOG install info if invalid language #2114

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Dec 1, 2022

This PR fixes #2112 (and probably that problem for other games).

We were passing en-US for all games when getting the download info, but some games like Roller Coaster Tycoon display 0. When using en-us it works fine.

What this PR is doing is:

  • first try with en-US (most games are fine with this from my tests)
  • if the list of languages in the install info does NOT include en-US, check which languages are valid
  • if en-us is a valid language, use it, else, use the first language in the list

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Dec 1, 2022
@@ -316,7 +316,8 @@ export class GOGLibrary {
*/
public async getInstallInfo(
appName: string,
installPlatform = 'windows'
installPlatform = 'windows',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we could also use the platform we have on context, this could improve the re-render process I guess.

@flavioislima flavioislima merged commit 2b8bbea into main Dec 1, 2022
@flavioislima flavioislima deleted the fix/try-en-us-for-gog-games branch December 1, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install Roller Coaster Tycoon (GOG)
2 participants