From fc6ebecf799a7668efe548cd0d0727ab7a7c7dc4 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 19 Mar 2024 15:04:01 -0400 Subject: [PATCH] Add platform-specific compression commands --- functions/compression.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/functions/compression.sh b/functions/compression.sh index feffae5a..15bce646 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -10,11 +10,17 @@ compress_game() { local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension" if [[ "$1" == "chd" ]]; then - if [[ "$$3" =~ ^(psp)$ ]]; then - /app/bin/chdman createdvd -i "$source_file" -o "$dest_file".chd - else + case "$3" in # Check platform-specific compression options + "psp" ) + /app/bin/chdman createdvd --hunksize 2048 -i "$source_file" -o "$dest_file".chd -c zstd + ;; + "ps2" ) + /app/bin/chdman createdvd -i "$source_file" -o "$dest_file".chd -c zstd + ;; + * ) /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd - fi + ;; + esac elif [[ "$1" == "zip" ]]; then zip -jq9 "$dest_file".zip "$source_file" elif [[ "$1" == "rvz" ]]; then