-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SteamGridDB: Implement GUI for getSteamGridDBArtwork command #1007
Conversation
53609dc
to
0e7e150
Compare
Updated the description to be a bit more informative, updated the heading to display the Game Name and AppID to add visual clarity for the current game, and added the showPic for further visual clarity. If the showPic is not found, the "Game Name (AppID)" in the title should help make it clearer what the current game is, this way the user should be less likely to forget what the game they're downloading artwork for is. |
Can't figure out how to change the window dimensions, maybe this is some Wayland weirdness with Yad so I'll leave it be. |
Had to make a couple of fixes, but as of 1ea5a89, this is working in initial testing! Tested with Persona 4 Golden (Steam) and the artwork downloaded and applied perfectly. Did not test the SteamGridDB Game ID yet, or Game Name, or Non-Steam Games. I also need to test the Apply checkbox to make sure it works, as well as the override for how to manage existing grids. |
Removed some comments and unneeded logging, and as of 4e8d0dd, ShellCheck is green on this. I will do a final check before merging (not ready to merge yet) but good progress is being made at a surprising rate. |
Helpscreen has been updated. Remaining work:
|
Tested SteamGridDB Game Name, works as expected for Steam and Non-Steam Games. |
Added notifier and some extra echo output for downloading SteamGridDB artwork, and a notifier on error when no Steam AppID, SteamGridDB Game ID, or Game Name is provided. |
Non-Steam Games are not displaying their titles because of a bug with |
Tested toggling the "Apply" checkbox and it works as expected. |
Tested SteamGridDB Game ID, works as expected. |
Tested the "Existing grids" dropdown, works as expected as well! |
The notifier is going to need changed, as my idea of displaying when a game is "Steam" and "Non-Steam" does not work. It is using I will push a fix soon. |
Notifier is fixed in 7cdc7d5. |
Testing for this PR is now complete. The remaining work is some last minute code checks, then some phrasing checks + langfile update, and finally a wiki update and a merge. |
Langfiles updated, phrasing looks ok. |
Testing is good on this, code is ready, langfiles updated, version bumped, ShellCheck is green. I will write the wiki update and then this will be ready to merge! |
Wiki update is ready, this can be merged! |
Implements #933.
Overview
This PR adds a GUI dialog frontend for the
commandlineGetSteamGridDBArtwork
SteamGridDB command, fully implementing the work for #933 and completing the SteamGridDB Overhaul. It allows a user to enter information on the frontend instead of manually entering it all on the commandline, which is a small Quality of Life enhancement.The options on this dialog are essentially a form for taking input for the SteamGridDB Command.
Implementation
Not much to add to this since the bulk of the implementation detail is for
commandlineGetSteamGridDBArtwork
.Usage:
steamtinkerlaunch sgdb <appid>
This works by the user running the
sgdb
command and give it an AppID, and then a dialog appears, allowing them to enter information to download artwork from SteamGridDB for that specific game. They can search for artwork using a Steam AppID (it doesn't have to be the AppID of the current game, i.e. they can get artwork for a version of a game on Steam that they don't own if it has better artwork), the SteamGridDB Game ID, or they can attempt to get artwork from a fuzzy Game Name search. SteamGridDB has an endpoint for fetching artwork by Game Name. This is all implemented on thecommandlineGetSteamGridDBArtwork
function, we just massage some of the entered data to make it easier to pass to the command.Managing Game Type Search
We use a variable to denote if we pass
--steam
or--nonsteam
to thecommandlineGetSteamGridDBArtwork
command, and we set this variable based on whether the userIf the user enters a Steam AppID, it will take priority and we will assume we're searching for artwork for a Steam game. Otherwise, we will search based on the SteamGridDB Game ID and assume we're using its game endpoint.
Since the command takes the AppID of a specific Steam game, we can force the filename AppID to this file, as we have the context of what AppID the user wants to set the SteamGridDB game artwork for. Therefore we should be able to search for artwork for a Non-Steam Game using a Steam AppID (for example, if using the GOG release of Oblivion, the user could still use the Steam AppID to fetch the game artwork, since the grids will use the
--filename-appid
).Some Specified Defaults
For selecting how to handle existing grids, we have a combobox, and this defaults to the option selected on the Global Menu just like the command does, except we select it visually as the default option on the GUI.
We also default to having the "Apply" option enabled, as it is probably sensible to have this on by default for the GUI portion of this work. A user can toggle it off and it is more likely that from the GUI a user will want the default behaviour to be that grids are set on Steam.
Remaining Work
This still needs a lot of testing, it's not ready for merging yet. There are also some other UI changes I want to make, such as changing the dialog size, and adding the notifier. I have noted the remaining work in a checklist under the "TODO" section at the bottom of this PR.
TODO: