ebenbruyns / junkstore

Transform your gaming experience with Junk-Store - the ultimate solution for seamlessly integrating non-Steam games into your Steam Deck library. Say goodbye to clunky work arounds and hello to a world of endless gaming possibilities. Get ready to elevate your gaming to the next level with Junk-Store!
https://junkstore.xyz/
Other
169 stars 5 forks source link

Add play time to games near the play button #49

Open lbcard opened 1 month ago

lbcard commented 1 month ago

Is your feature request related to a problem? Please describe. Not related to a problem. It would be really cool to see play time for games within Junk Store where you launch the game (kind of what you get in Steam). I see that it is viewable within the Epic Games Launcher (below is from the PC version) so fingers crossed it is something obtainable via an Epic API?

image

Describe the solution you'd like In a similar way to how Steam does it, just display the total play time of the game near the play button. Stuff like 'last played' might be be a nice extra if easily obtainable at the same time.

image

Describe alternatives you've considered n/a

Additional context I am a Typescript/Javascript (and a bit of Python) developer myself so might be tempted to have a go and submit a PR myself. Just raising the issue here in case it was something already being worked on or if there were any quick pointers to possibly relevant API docs that come to mind? - I'd be happy to have a read up and see what might be possible. I'm guessing it might be buried somewhere around here 🤔 https://dev.epicgames.com/docs/epic-games-store/services/ecom/ecom-overview

ebenbruyns commented 1 month ago

Yes I think you should have a crack at it. I'd suggest you try to get the information in the Epic Extension, it's actually possible to put that info in the game description section so the plugin itself shouldn't need to be altered. This will reduce your workload to only python code and a tiny fraction of html for formatting. The challenging part will be pulling the data out of the api's I'm not sure if legendary returns this data. If it doesn't it might be worth patching legendary and submitting the PR up stream to legendary and then just pull that data into the game details.

There's a few ways this can be achieved, we just have to be careful around performance, there's already some bottlenecks in place and this would add to it.

I totally encourage you to have a go at this though! Just don't do more work than you need to ;)