Closed sonic2kk closed 10 months ago
Started some initial work on this, will get a draft PR up soon oh boy this is a task...
There is a massively in-flux branch over at steamgriddb-overhaul
. Right now it only can download artwork for Steam and Non-Steam games, but only Non-Steam Game artwork is hooked up. The functions to get grids for ALL installed or ALL owned Steam games is also hooked up to use this, but of course I have not tested this :sweat_smile:
Right now, the artwork does not at all respect the preferences selected by the user in the Global Menu, as those preferences only apply to grid artwork (boxart). We still need to overhaul the Global Menu SteamGridDB options to select things like dimensions, styles, etc. This is probably going to be a massive overhaul. Once we have these, they'll be saved as preferences on the Global Menu, so we can just slot these in when making the call in commandlineGetSteamGridDBArtwork
.
We need as well a way to wire this function up to the commandline, which will probably involve a massive overhaul of our SteamGridDB commandline options to group the actions together as much as possible
steamtinkerlaunch getsteamgriddbartwork single --search-id="" --blah --blah
, with alternative options owned
and installed
which will manage all owned and installed options, and instead of calling commandlineGetSteamGridDBArtwork
they will call getGridsForOwnedGames
and getGridsForInstalledGames
).And finally, we need a way to get icons for Non-Steam Games. This can really only be done at time of adding Non-Steam Games right now, as we have no way to update an entry of the shortcuts VDF file right now (icon is stored as a string field in shortcuts.vdf
, which is the path to the icon). We'll probably make a separate function to download the icon and return the path, though, so we can use it in addNonSteamGame
(we fetch artwork before writing out to shortcuts.vdf
, so we can overwrite the shortcut variable value with it so we write out the downloaded icon path).
So still lots of work to do here, but things are moving now.
When completed, #934 will probably accomplish everything in this issue. Just with how things worked out, I guess it never ended up being split into multiple PRs like I had hoped/envisioned.
Tenfoot can be handled with the same grid endpoint, but with different dimension parameters. See https://github.com/sonic2kk/steamtinkerlaunch/pull/934#issuecomment-1764864657 -- Very glad that this should work out to be much simpler than anticipated!
I had an idea to add an option for fetching all artwork for Non-Steam games as well, it's on the todo for #934 but will probably go in a separate PR, as we'll need a way to parse all known Non-Steam Game AppIDs from the shortcuts.vdf
.
There was another idea I had about potentially allowing searching on Game Name on SteamGridDB. This would be tricky as we'd have to pick the first game name that matches, so for the commandline it should be an optional parameter instead of --search-id
, and for Non-Steam Games we'd do a UI revamp:
If both textboxes are blank, we will use the name entered in the Non-Steam Game Name field (same goes for commandline). We'd also update the commandline options accordingly.
Did some more tests with the SteamGridDB search endpoint and it seems pretty reliable! I tested with Touhou 6 (which has various names and it worked no matter what name I entered) and Brutal Legend (which has a special character). I also tested with "Sonic Adventure™ 2" (which is the name Steam uses) and "NieR:Automata", which worked.
I did have an issue with "NieR:Replicant", which returned success but no data. However, the same thing happens when I search for that game on SteamGridDB's website, so it's not something we need to worry about.
When this is added and when the wiki is updated to document this, we should note to users that the name has to be exact if they want exact matches, for example "The Elder Scrolls IV: Oblivion" is NOT equivalent to "The Elder Scrolls IV: Oblivion Game of the Year Edition".
In short, searching by game name is more than feasible it seems. Huge props to SteamGridDB for having such useful and robust endpoints.
The initial work for this was merged in #934 ! We now have a much more streamlined SteamGridDB integration and we can now do the following:
The next pieces of work will be quality of life enhancements on top of this:
shortcuts.vdf
(this may go in a separate issue, as this will be far down the road when we can get a list of all Steam shortcut AppIDs)But overall there has been big progress here!
Some good work has been done on this. We now have timeout/retries for pinging SteamGridDB, and we can search on Game Name and Steam AppID when adding Non-Steam Games. Now it is really frictionless to use SteamGridDB artwork when adding Non-Steam Games!
Now we need a frontend for commandlineGetSteamGridDBArtwork
, and a command to set artwork for all Non-Steam Games in shortcuts.vdf
. We could also extend this further by having an option to list Non-Steam Game AppIDs, so a user can run steamtinkerlaunch getid <non-steam game name>
. This would make it easier if a user wants to add artwork for a Non-Steam Game after-the-fact, combined with the commandlineGetSteamGridDBArtwork
frontend GUI option. Being able to easily get the AppID of a Non-Steam Game will make it easier to retroactively set artwork, and two good ways to do this are by having the command to set artwork for all shortcuts, and by integrating getid
with Non-Steam Games.
Command to download grids for all Non-Steam Games was added in #963. The only remaining bit of work for this issue is the frontend GUI for fetching SteamGridDB artwork.
New year, time to finally close this issue out. Begun work on the GUI frontend for the SteamGridDB command, basically allowing a frontend to enter the information to pass to the command. Unsure how to structure the UI just yet, but we're getting there.
Once implemented, the wiki should also be updated to show this new functionality.
The SteamGridDB Overhaul is finally fully complete after many months of work! Thanks to all who suggested improvements and tested. This is one of the most significant initiatives STL has seen in recent times, and has the most user-facing impact. I hope this is useful for users :-)
System Information
Feature Description
(expansion of #906)
Current Behaviour
The SteamGridDB settings right now, for both Steam games and Non-Steam Games, will download only the images available at SteamGridDB's
grid
endpoint.https://www.steamgriddb.com/api/v2/grids/steam/<steam_appid>
https://www.steamgriddb.com/api/v2/grids/game
This
grid
endpoint only returns the game boxart, so we aren't giving the user any way to fetch the hero or logo artwork. This does limit the usefulness of the feature.Proposed Enhancements
This is already implemented, so I'm putting it behind a spoiler. The implementation turned out to be simpler than this and so ended up changing, but I'm keeping it here for legacy :-) The remaining work is covered in the todos and the PRs linked to this issue.
Legacy Implementation Details
The idea is to allow SteamTinkerLaunch to download more game artworks from SteamGridDB. To do this would require an overhaul of the internals of how we do this, as well as a GUI overhaul. Right now, on the Global Menu we have a basic set of options that look as below, but we will expand upon this to allow more functionality when using SteamGridDB. ![image](https://github.com/sonic2kk/steamtinkerlaunch/assets/7917345/7a65941a-d9d4-4714-b124-48c5e30a821d) To enhance the functionality, we should do the following - Update code to be able to fetch SteamGridDB artwork based on - Expand the **Global Menu**'s SteamGridDB options to include checkboxes, dimensions, categories etc for each image type. - This would encompass the following: - Logo - Hero - Banner - (Non-Steam Game Only) Icon - We should include an option to toggle each of these with them all enabled by default. - We need an option to specify dimensions etc for EACH of these, as a user may want that flexibility. - We should prioritise the recommended Steam dimensions. - Update commandline usage to integrate with these overhauls - These toggles will be stored as global variables, so commandline usage should pick this up by default when calling the functions to get the artwork, which should be responsible for checking and fetching the relevant artworks based on these global variable values. - We should consider breaking this out from being a sub-argument for `steamtinkerlaunch update` and make it its own `steamgriddb` command, essentially overhauling commandline usage. We could keep the existing logic but also add an alias, to preserve compatibility. It may be a big burden to do this, so simply picking one or the other may be best. - On the commandline we should also accept the Game ID when running the command to get SteamGridDB artwork, so it can be updated without having to launch STL explicitly (i.e. `steamtinkerlaunch update gridThis is a pretty big overhaul and will likely be completed in stages, which I will attempt to outline below. We can use this to track the progress of implementation.
Part 1
Add textbox on Game Menu to optionally specify SteamGridDB Game ID(irrelevant, though if someone really wants it they can submit a PR)Add command to take in SteamGridDB API token(command already exists)Part 2
These changes can be worked on after #934 is merged.
steamtinkerlaunch sgdb
wiithout options should open a Yad window where a user can enter information for the SteamGridDB commandline fetcher function, with options to select which artwork they want to download as well, and options to enter the Steam AppID/Game ID etc -- Essentially a frontend for the sgdb command)shortcuts.vdf
(can get all Steam Shortcut AppIDs using this gist I wrote up)Add command to clean up grids stored by SteamTinkerLaunch in its config folder(this would be a good thing to implement more broadly, to clean up STL downloaded files, would potentially be more useful as going into the cache folder once #486 is implemented)