From 31dbca315d8fe28d54c15477c658496d74277c0e Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 8 Sep 2024 10:31:52 +0900 Subject: [PATCH] STEAM_SYNC: adding more sanitized games cases --- functions/steam_sync.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/functions/steam_sync.sh b/functions/steam_sync.sh index dd381383..ab0b0cef 100644 --- a/functions/steam_sync.sh +++ b/functions/steam_sync.sh @@ -261,9 +261,12 @@ declare -A alt_command_list=( ) # Add games to Steam function -addToSteam() { +add_to_steam() { log "i" "Starting Steam Sync" + steamsync_folder="$rdhome/.sync" + create_dir $steamsync_folder + local srm_path="/var/config/steam-rom-manager/userData/userConfigurations.json" if [ ! -f "$srm_path" ]; then log "e" "Steam ROM Manager configuration not initialized! Initializing now." @@ -317,7 +320,8 @@ addToSteam() { # Sanitize the game name for the filename: replace special characters with underscores local sanitized_name=$(echo "$name" | sed -e 's/^A-Za-z0-9._-/ /g') - local sanitized_name=$(echo "$sanitized_name" | sed -e 's/:/-/g') + local sanitized_name=$(echo "$sanitized_name" | sed -e 's/:/ -/g') + local sanitized_name=$(echo "$sanitized_name" | sed -e 's/&/and/g') local sanitized_name=$(echo "$sanitized_name" | sed -e 's/ / - /g') local sanitized_name=$(echo "$sanitized_name" | sed -e 's/ / /g') log d "File Path: $path" @@ -345,12 +349,10 @@ addToSteam() { echo "$command \"$path\"" >> "$launcher" chmod +x "$launcher" - - /app/bin/zypak-wrapper.sh steam-rom-manager add "$launcher" done fi done - + steam-rom-manager add log i "Steam Sync: completed" }