Skip to content
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

Add Non-Steam Game: Overhaul SteamGridDB Integration #944

Merged
merged 12 commits into from
Oct 19, 2023

Conversation

sonic2kk
Copy link
Owner

@sonic2kk sonic2kk commented Oct 18, 2023

Another big piece of work for #933.

Overview

This PR overhauls the SteamGridDB options for Add Non-Steam Game, with the following changes:

  • Add Non-Steam Game GUI
    • Gate all SteamGridDB calls behind a checkbox
    • Add option to search on Steam AppID, which will take an exact AppID and fetch artwork for this game, and apply it to the Non-Steam Game
    • Add option to search on Game Name, which will search for the SteamGridDB Game ID using the entered name
    • If SteamGridDB option is enabled, but we don't pass any values to search on, we will search on Non-Steam Game Name
  • Commandline Add Non-Steam Game
    • Add new --use-steamgriddb flag to specify that we want to search using SteamGridDB
    • Add new --sgnm flag to search on a name
    • Add new --sgai flag to search on Steam AppID
    • If any of these are passed, enable --use-steamgriddb automatically
    • If no Game ID, Game Name, or Steam AppID are passed, and --use-steamgriddb is specified, fall back to searching for SteamGridDB Game ID using Non-Steam Game Name

image

This still needs in-depth testing, but initial testing is promising!

Remaining work

However, there is an issue with the GUI. Right now it is too big to display as a dialogue on regular 1080p displays, and even when maximised it hides the buttons at the bottom. This makes it pretty much unusable, so we'll need to make it scrollable or something.

We also have to update the helpscreen and wiiki with these new parameters.


TODO:

  • Test GUI
  • Test commandline
  • Update helpscreen
  • Update wiki
  • Update langfiles
  • Version bump

@sonic2kk
Copy link
Owner Author

Tested with just passing the game name and enabling SteamGridDB (no Game ID/App ID/Game Name passed at all) and it worked for Cake Mania!

Next we need to test Game ID, Steam AppID, and game name individually, and then test the fallbacks to make sure they work.

We need to test from the commandline as well after all of this too, ideally the same cases.

@sonic2kk
Copy link
Owner Author

Entering a custom game name to search on will correctly use that instead of the App Name!

@sonic2kk
Copy link
Owner Author

On the UI front, this appears to be mostly working as expected.

  • If SteamGridDB is not checked, no artwork will be downloaded
  • Uses Game Name if no other options are supplied and SteamGridDB is enabled
  • Uses custom name over game name
  • Uses Steam AppID OR SteamGridDB Game ID (in that order of priority) if custom name returns no matches
  • Will search on Steam AppID if provided and no other options are given
  • Will search on SteamGridDB Game ID if no other options are given
  • Will prefer Steam AppID over SteamGridDB Game ID
  • Will prefer custom name over any ID given, and if nothing is returned, as mentioned it will fall back to either Steam AppID or SteamGridDB Game ID (but not both)

Commandline has not been tested extensively yet, but it should work since the UI just uses the commandline options.

@sonic2kk
Copy link
Owner Author

Functionally, this feature is complete, but we need to update the wiki to note these changes, and fix the UI sizing issue.

@sonic2kk
Copy link
Owner Author

Wiki overhaul is ready to go, we just need to finish up this PR!

@sonic2kk
Copy link
Owner Author

sonic2kk commented Oct 19, 2023

Commandline usage seems to not work...

It seems that if --use-steamgriddb is not passed, then no artwork is fetched, even if other fields are provided. When it is passed, everything works as expected.

So I need to figure out and fix this, as --use-steamgriddb should not be required on the commandline.

@sonic2kk
Copy link
Owner Author

Fixed with 72c68b8.

@sonic2kk
Copy link
Owner Author

Menu is now scrollable, so we should just have to update the langfiles now and be good to go!

@sonic2kk
Copy link
Owner Author

Langfiles should be synced up now, will do a couple of final tests and then bump the version and merge!

@sonic2kk
Copy link
Owner Author

Shellcheck is good, testing with and without SteamGridDB works (including local game art), SteamGridDB is only fetched on GUI when SteamGridDB is enabled, auto enabled if any fields are passed on commandline, and all fallbacks work as expected. This is good to merge!

@sonic2kk sonic2kk merged commit eababa8 into master Oct 19, 2023
@sonic2kk sonic2kk deleted the ansg-sgdb-steam-appid branch October 21, 2023 22:12
@sonic2kk sonic2kk linked an issue Oct 23, 2023 that may be closed by this pull request
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Overhaul SteamGridDB Integration
1 participant