OMGDuke / protondb-decky

ProtonDB Badges is a plugin for Decky Loader to display tappable ProtonDB badges on your game pages
https://decky.xyz/
GNU General Public License v3.0
84 stars 10 forks source link

Support non steam games that have protonDB pages #3

Closed OMGDuke closed 1 year ago

OMGDuke commented 1 year ago

For non-Steam games, get the equivalent Steam app id if it exists then query ProtonDB

EMERALD0874 commented 1 year ago

I don't know if you've started investigating this yet or not, but Steam has an API for getting all game titles associated with their app IDs. The JSON result is about 8MB large, so maybe you could download it at startup and refer to it if a game can't be found.

http://api.steampowered.com/ISteamApps/GetAppList/v0002/

OMGDuke commented 1 year ago

While 8mb is fairly negligible I'd like to research if there are any other APIs available that allow you to search a game name (ideally fuzzy) and return an appId if applicable

If not calling that once on plugin init isn't too bad

OMGDuke commented 1 year ago

Haven't found anything that matches what I want above so building a poc with the api you linked @EMERALD0874 👍

OMGDuke commented 1 year ago

So it may only be 8mb but its a lot of data. Trying to process it on front end seems to (understandably) lock up the main thread :P

Potentially we can run and cache this on python backend then check against it by sending a request containing game name from front end?

Or I'll try harder to find an api that already does this

EMERALD0874 commented 1 year ago

Found a new API used by Steam Community that may work. Keep in mind this only works with games that have community pages. Games that have been taken down from Steam (ex. Fall Guys, Rocket League) do not appear. https://steamcommunity.com/actions/SearchApps/overcooked