From 4e8d0dde54ac0bf0b83162ef46d300392f2dc8ff Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Thu, 11 Jan 2024 21:23:45 +0000 Subject: [PATCH] SteamGridDB: Code cleanup --- steamtinkerlaunch | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 8f391db4..7e8174a1 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20230112-3 (sgdb-artwork-gui)" +PROGVERS="v14.0.20230112-4 (sgdb-artwork-gui)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -1550,19 +1550,10 @@ function getSteamGridDBArtworkGUI { pollWinRes "$TITLE" setShowPic - ## TODO adjust dialog size, it's too tall and probably too wide - ## TODO display game banner like we do in Set Game Art? - # - # Remove below after implementation: - # - # Menu will work by having boxes for a Steam AppID, SteamGridDB Game ID, or Game Name - # - If Steam AppID box is populated, ignore Game ID box and search on Steam AppID (--search-id="$FSGDBSN" and store "--steam" as variable to pass to cmd) - # - Otherwise use Game ID box (store "--nonsteam" as variable to pass to cmd) - # Will also have box for Game Name which we will always pass (if no match found for name, we should fall back to one of the AppIDs given) - # If all boxes are empty, nothing will happen - # Show notifier to display some feedback, and use logging to note what values we got and what is being prioritised - # Since we'll have the AppID handy, we can specify the filename_appid - # + # AppID passed from commandline is used as --filename-appid + # User can provide Steam AppID, SteamGridDB Game ID, or Game Name (used to attempt to fetch SteamGridDB Game ID) + # - Steam AppID is prioritised if provided + # - commandlineGetSteamGridDBArtwork is set to fall back to SteamGridDB Game ID if Game Name doesn't return anything, so passing both is fine # SGDBHASFILE will use the global option by default and populate the dropdown with the relevant option, just like the command does # It will use the Global Menu default, but also allows the user to specify a different action this time # @@ -1612,16 +1603,6 @@ function getSteamGridDBArtworkGUI { FSGDBAWAPPLYARTWORKFLAG="--no-apply" fi - # Extra logging, mainly for debugging purposes - writelog "INFO" "${FUNCNAME[0]} - FSGDBAWAPPID: ${FSGDBAWAPPID}" - writelog "INFO" "${FUNCNAME[0]} - FSGDBAWGAMEID: ${FSGDBAWGAMEID}" - writelog "INFO" "${FUNCNAME[0]} - FSGDBAWSEARCHNAME: ${FSGDBAWSEARCHNAME}" - writelog "INFO" "${FUNCNAME[0]} - FSGDBAWHASFILE: ${FSGDBAWHASFILE}" - writelog "INFO" "${FUNCNAME[0]} - FSGDBAWAPPLYARTWORK: ${FSGDBAWAPPLYARTWORK}" - writelog "INFO" "${FUNCNAME[0]} - ############################################" - writelog "INFO" "${FUNCNAME[0]} - FSGDBAWGAMETYPEFLAG: ${FSGDBAWGAMETYPEFLAG}" - writelog "INFO" "${FUNCNAME[0]} - FSGDBAWAPPLYARTWORKFLAG: ${FSGDBAWAPPLYARTWORKFLAG}" - # Execute actual fetching of artwork, could probably put notifier here writelog "INFO" "${FUNCNAME[0]} - Executing 'commandlineGetSteamGridDBArtwork --search-id=\"${FSGDBAWGAMEID}\" --search-name=\"${FSGDBAWSEARCHNAME}\" --filename-appid=\"${FSGDBAWFILENAMEAPPID}\" \"${FSGDBAWHASFILE}\" \"${FSGDBAWGAMETYPEFLAG}\"'" commandlineGetSteamGridDBArtwork --search-id="${FSGDBAWSEARCHID}" --search-name="${FSGDBAWSEARCHNAME}" --filename-appid="${FSGDBAWFILENAMEAPPID}" "${FSGDBAWHASFILE}" "${FSGDBAWAPPLYARTWORKFLAG}" "${FSGDBAWGAMETYPEFLAG}"