OpenAsar / arrpc

Open Discord RPC server for atypical setups
https://arrpc.openasar.dev
MIT License
461 stars 69 forks source link

Grabing activity from Steam #47

Open arturius453 opened 1 year ago

arturius453 commented 1 year ago

Steam api has option to see what game user currently playing
It requires steam account id (easily obtainable) and API key. This key is accessible here for any logged in user and accepts any string in "domain" field. It's not unreasonable to ask user to get their own, since target audience already nerds would be able download, compile and run this project

http://api.steampowered.com/ISteamUser/GetPlayerSummaries/ returns JSON containing gameid - steam id of game and gameextrainfo - name of the game.
By altering searching of DetectableDB it is possible to search by steam id if provided or by game name, which are commonly same between Steam and Discord Verified games list If game not found in this list it still can be used as custom activity

Con of this process is not having pid of game process, which is part of existing code base, but I hope it can be turned off and replaced with gameid field not existing or analyzing child processes of steam.

I understand it's not easy not implement, but without this arrpc on linux is kinda useless, cause detectable.json contains 5 linux executables: csgo ,terraria and 3 nonames, not even Dota2

CanadaHonk commented 1 year ago

Interesting idea but quite specific. Generally supporting Wine (#35) would probably be nicer but this could also be done in addendum.