From b637ddd72182823e059c610bce68879ea4f122b4 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 20 Mar 2025 15:33:01 -0400 Subject: [PATCH] Update compress_game to accept post-compression-cleanup argument directly --- functions/compression.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/functions/compression.sh b/functions/compression.sh index e70fb948..247eb442 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -2,7 +2,7 @@ compress_game() { # Function for compressing one or more files to .chd format - # USAGE: compress_game $format $full_path_to_input_file $system(optional) + # USAGE: compress_game $format $full_path_to_input_file $cleanup_choice $system(optional) local file="$2" local filename_no_path=$(basename "$file") local filename_no_extension="${filename_no_path%.*}" @@ -11,8 +11,9 @@ compress_game() { local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension" if [[ "$1" == "chd" ]]; then - case "$3" in # Check platform-specific compression options + case "$4" in # Check platform-specific compression options "psp" ) + log d "Compressing PSP game $source_file into $dest_file" /app/bin/chdman createdvd --hunksize 2048 -i "$source_file" -o "$dest_file".chd -c zstd ;; "ps2" ) @@ -32,7 +33,7 @@ compress_game() { dolphin-tool convert -f rvz -b 131072 -c zstd -l 5 -i "$source_file" -o "$dest_file.rvz" fi - if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested + if [[ "$3" == "true" ]]; then # Remove file(s) if requested if [[ -f "${file%.*}.$1" ]]; then log i "Performing post-compression file cleanup" if [[ "$file" == *".cue" ]]; then