Skip to content

Commit 4e8d0dd

Browse files
committed
SteamGridDB: Code cleanup
1 parent 1ea5a89 commit 4e8d0dd

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

steamtinkerlaunch

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
PREFIX="/usr"
77
PROGNAME="SteamTinkerLaunch"
88
NICEPROGNAME="Steam Tinker Launch"
9-
PROGVERS="v14.0.20230112-3 (sgdb-artwork-gui)"
9+
PROGVERS="v14.0.20230112-4 (sgdb-artwork-gui)"
1010
PROGCMD="${0##*/}"
1111
PROGINTERNALPROTNAME="Proton-stl"
1212
SHOSTL="stl"
@@ -1550,19 +1550,10 @@ function getSteamGridDBArtworkGUI {
15501550
pollWinRes "$TITLE"
15511551
setShowPic
15521552

1553-
## TODO adjust dialog size, it's too tall and probably too wide
1554-
## TODO display game banner like we do in Set Game Art?
1555-
#
1556-
# Remove below after implementation:
1557-
#
1558-
# Menu will work by having boxes for a Steam AppID, SteamGridDB Game ID, or Game Name
1559-
# - 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)
1560-
# - Otherwise use Game ID box (store "--nonsteam" as variable to pass to cmd)
1561-
# 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)
1562-
# If all boxes are empty, nothing will happen
1563-
# Show notifier to display some feedback, and use logging to note what values we got and what is being prioritised
1564-
# Since we'll have the AppID handy, we can specify the filename_appid
1565-
#
1553+
# AppID passed from commandline is used as --filename-appid
1554+
# User can provide Steam AppID, SteamGridDB Game ID, or Game Name (used to attempt to fetch SteamGridDB Game ID)
1555+
# - Steam AppID is prioritised if provided
1556+
# - commandlineGetSteamGridDBArtwork is set to fall back to SteamGridDB Game ID if Game Name doesn't return anything, so passing both is fine
15661557
# SGDBHASFILE will use the global option by default and populate the dropdown with the relevant option, just like the command does
15671558
# It will use the Global Menu default, but also allows the user to specify a different action this time
15681559
#
@@ -1612,16 +1603,6 @@ function getSteamGridDBArtworkGUI {
16121603
FSGDBAWAPPLYARTWORKFLAG="--no-apply"
16131604
fi
16141605

1615-
# Extra logging, mainly for debugging purposes
1616-
writelog "INFO" "${FUNCNAME[0]} - FSGDBAWAPPID: ${FSGDBAWAPPID}"
1617-
writelog "INFO" "${FUNCNAME[0]} - FSGDBAWGAMEID: ${FSGDBAWGAMEID}"
1618-
writelog "INFO" "${FUNCNAME[0]} - FSGDBAWSEARCHNAME: ${FSGDBAWSEARCHNAME}"
1619-
writelog "INFO" "${FUNCNAME[0]} - FSGDBAWHASFILE: ${FSGDBAWHASFILE}"
1620-
writelog "INFO" "${FUNCNAME[0]} - FSGDBAWAPPLYARTWORK: ${FSGDBAWAPPLYARTWORK}"
1621-
writelog "INFO" "${FUNCNAME[0]} - ############################################"
1622-
writelog "INFO" "${FUNCNAME[0]} - FSGDBAWGAMETYPEFLAG: ${FSGDBAWGAMETYPEFLAG}"
1623-
writelog "INFO" "${FUNCNAME[0]} - FSGDBAWAPPLYARTWORKFLAG: ${FSGDBAWAPPLYARTWORKFLAG}"
1624-
16251606
# Execute actual fetching of artwork, could probably put notifier here
16261607
writelog "INFO" "${FUNCNAME[0]} - Executing 'commandlineGetSteamGridDBArtwork --search-id=\"${FSGDBAWGAMEID}\" --search-name=\"${FSGDBAWSEARCHNAME}\" --filename-appid=\"${FSGDBAWFILENAMEAPPID}\" \"${FSGDBAWHASFILE}\" \"${FSGDBAWGAMETYPEFLAG}\"'"
16271608
commandlineGetSteamGridDBArtwork --search-id="${FSGDBAWSEARCHID}" --search-name="${FSGDBAWSEARCHNAME}" --filename-appid="${FSGDBAWFILENAMEAPPID}" "${FSGDBAWHASFILE}" "${FSGDBAWAPPLYARTWORKFLAG}" "${FSGDBAWGAMETYPEFLAG}"

0 commit comments

Comments
 (0)