aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-11-04 22:48:05 +0100
committerdec05eba <dec05eba@protonmail.com>2024-11-04 22:48:05 +0100
commit623297b18a812c3f64c9ae98df695f064c0ed240 (patch)
treeec346a1f408a6f95090145aa5968c004f2f2c71d /scripts
parent3d51801a90f5045871e575ed896c0be7619ba1f6 (diff)
Prefer window title for game name rather than class, fix game names with slash not saving to correct dir
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/save-video-in-game-folder.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/save-video-in-game-folder.sh b/scripts/save-video-in-game-folder.sh
index 694c9d8..3d07d6a 100755
--- a/scripts/save-video-in-game-folder.sh
+++ b/scripts/save-video-in-game-folder.sh
@@ -7,6 +7,7 @@ file_name="$(basename "$filepath")"
file_dir="$(dirname "$filepath")"
game_name=$(gsr-window-name focused || echo "Game")
+game_name="$(echo "$game_name" | tr '/\\' '_')"
target_dir="$file_dir/$game_name"
new_filepath="$target_dir/$file_name"