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

Humble - workaround for some games not supplying Steam IDs #13

Open
DragRedSim opened this issue Feb 14, 2019 · 1 comment
Open

Humble - workaround for some games not supplying Steam IDs #13

DragRedSim opened this issue Feb 14, 2019 · 1 comment

Comments

@DragRedSim
Copy link
Contributor

Some of the recent games in the Humble Great GameMaker Games bundle don't report Steam AppIDs in the JSON, however they are reporting subscription IDs. I've added a line to the definition of d (the game info variable):
sub: parseInt(game.steam_package_id, 10)

Further to this, I also modified the Steam Store link adding code to check if there is an invalid (NaN) app ID, and if so to fall back to the provided sub ID page.

// append Steam store link
if (isNaN(d.app)) {
    $keyRedeemer.find('h4 > span').eq(0).after(`<span> | </span><a class="SBSE-link-steam_store" href="https://store.steampowered.com/sub/${d.sub}/" target="_blank">${i18n.get('steamStore')}</a>`);
} else {
    $keyRedeemer.find('h4 > span').eq(0).after(`<span> | </span><a class="SBSE-link-steam_store" href="https://store.steampowered.com/app/${d.app}/" target="_blank">${i18n.get('steamStore')}</a>`);
}

It's not foolproof, for example Cook, Serve, Delicious! is listed as unowned, because I purchased through Steam, however the sub ID given is for a retail key. However, it's an improvement, as it lists games I know I own as being owned, which was not the case previously.

@clancy-chao
Copy link
Owner

Thank you for reporting.

Added Steam Database link in v2.12.3 for users to check if appID is not available.
Don't really have a good solution to check subs, as a game can have tens of subs with same contents in them.
One method I can think of is to fetch SteamDB and check if you owned the apps in that sub.
But this violates SteamDB's ToS which they will block you from accessing their website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants