-
Notifications
You must be signed in to change notification settings - Fork 84
Description
System Information
- SteamTinkerLaunch version: 14.0.20231010-1
- Distribution: Arch Linux
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.
- For Steam games, we hit
https://www.steamgriddb.com/api/v2/grids/steam/<steam_appid> - For Non-Steam Games (when we add them via "Add Non-Steam Game"), we can take the SteamGridDB Game ID and then hit
https://www.steamgriddb.com/api/v2/grids/game - In both cases, we only fetch the most popular, but this is expected behaviour
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.
- icon is also a valid endpoint, but only available for Non-Steam Games. Steam does allow you to temporarily overwrite this, but Steam will update it again itself, as this is stored in a cache
- tenfoot is not available, but more on that later
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.
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.
- This would encompass the following:
- 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 updateand make it its ownsteamgriddbcommand, 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 grid <id>)- This command currently updates either OWNED or INSTALLED games (defaults to
installed), but THIS SHOULD BE CHANGED to instead only download artwork for the current game by default, or a custom Steam AppID/Game ID, and then allowing owned/installed. We could simply add a separate command that will accept these arguments, so whensteamtinkerlaunch update gridis used, we will use installed/owned, otherwise we can take AppID. Though keeping the wiki in sync here would be a pain!- Default should be the current game, and if no game is specified to the command, error out and exit (on the UI, we should try default to passing the command the current game ID/SteamGridDB Game ID, prioritising the SteamGridDB Game ID and only passing AppID if that is not specified)
- This command currently updates either OWNED or INSTALLED games (defaults to
- Add command to set the SteamGridDB API token (perhaps under the existing
updateblock?) - Add textbox on the Game Menu to optionally specify the SteamGridDB Game ID to fetch artwork on
- This allows overriding the artwork for a specific game, for example if you want the same artwork for, say, two different editions of the same game.
- We do NOT need to integrate with Set Game Artwork, as we already have a command for setting Game Artwork
- Though this should be updated to accept the SteamGridDB Game ID, otherwise fall back to the AppID.
- Update Set Game Artwork wiki page to note how to integrate with SteamGridDB, with a link to that wiki page
- Ensure these changes apply to Steam and Non-Steam Games
- Both by allowing Non-Steam Games to download and set artwork via STL, and on Add Non-Steam Games
- Currently, the SteamGridDB options don't work at all with Non-Steam Games excluding optionally fetching boxart by Game ID when running "Add Non-Steam Game"
- By allowing the option to pass the SteamGridDB Game ID on the Game Menu, we should be able to allow them to work
- Add dropdown to manage how the user wants to specify a tenfoot (recently played banner image), with the following options:
- Dropdown: Use Grid Artwork as Tenfoot
- None (default)
- Hero
- Boxart
- Logo
- Checkbox: Resize Tenfoot Grid
- Default: Unchecked
- Dropdown Combobox: Tenfoot Dimensions
- Default to
600x350(Valve recommended dimensions) - Split text on
xin0x0
- Default to
- Dropdown: Use Grid Artwork as Tenfoot
- Update/Overhaul SteamGridDB wiki page to document functionality and usage
This 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
- Overhaul UI/backend to allow fetching game hero, logo, boxart (and icons for Non-Steam Games)
- Add options to allow automatic creation of a tenfoot since we can't get it from SteamGridDB
- Update relevant wiki pages (SteamGridDB, Add Non-Steam Game, Set Game Artwork)
- Update commandline usage help screens to note the new functionality as it is added
- Update commandline to change default behaviour to accept AppID, using any per-game SteamGridDB Game ID if specified in the per-game config file, and otherwise falling back to the AppID
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.
- Add command for searching for SteamGridDB Game ID by name
- Allow entering Steam AppID when adding Non-Steam Games
- Add command to remove all grids or per-game grids
- Add retry/timeout to SteamGridDB requests
- Add GUI for setting SteamGridDB artwork per-game (
steamtinkerlaunch sgdbwiithout 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) - Add option to add artwork for all Non-Steam Games in
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 STL stores non-config data in ~/.config #486 is implemented)
