Merge pull request #276 from icenine451/cooker-0.6.3b-icenine451

Cooker-0.6.3b-icenine451
This commit is contained in:
icenine451 2023-03-23 16:08:22 -04:00 committed by GitHub
commit ceac45dc48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -47,14 +47,14 @@ file_browse() {
while [ $file_selected == false ] while [ $file_selected == false ]
do do
local target="$(zenity --file-selection --title="Choose $1")" local target="$(zenity --file-selection --title="Choose $1")"
if [ ! -z $target ] #yes if [ ! -z "$target" ] #yes
then then
zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="No" --ok-label "Yes" \ zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="No" --ok-label "Yes" \
--text="File $target chosen, is this correct?" --text="File $target chosen, is this correct?"
if [ $? == 0 ] if [ $? == 0 ]
then then
file_selected=true file_selected=true
echo $target echo "$target"
break break
fi fi
else else
@ -129,15 +129,16 @@ validate_for_chd () {
# USAGE: validate_for_chd $input_file # USAGE: validate_for_chd $input_file
local file="$1" local file="$1"
local normalized_filename=$(echo "$file" | tr '[:upper:]' '[:lower:]')
local file_validated="false" local file_validated="false"
current_run_log_file="chd_compression_$(basename "$file").log" current_run_log_file="chd_compression_$(basename "$file").log"
echo "Validating file:" "$file" > "$logs_folder/$current_run_log_file" echo "Validating file:" "$file" > "$logs_folder/$current_run_log_file"
if [[ "$file" == *".cue" ]] || [[ "$file" == *".gdi" ]] || [[ "$file" == *".iso" ]]; then if [[ "$normalized_filename" == *".cue" ]] || [[ "$normalized_filename" == *".gdi" ]] || [[ "$normalized_filename" == *".iso" ]]; then
echo ".cue/.iso/.gdi file detected" >> "$logs_folder/$current_run_log_file" echo ".cue/.iso/.gdi file detected" >> "$logs_folder/$current_run_log_file"
local file_path=$(dirname "$(realpath "$file")") local file_path=$(dirname "$(realpath "$file")")
local file_base_name=$(basename "$file") local file_base_name=$(basename "$file")
local file_name=${file_base_name%.*} local file_name=${file_base_name%.*}
if [[ "$file" == *".cue" ]]; then # Validate .cue file if [[ "$normalized_filename" == *".cue" ]]; then # Validate .cue file
echo "Validating .cue associated .bin files" >> "$logs_folder/$current_run_log_file" echo "Validating .cue associated .bin files" >> "$logs_folder/$current_run_log_file"
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
echo "Associated bin files read:" >> "$logs_folder/$current_run_log_file" echo "Associated bin files read:" >> "$logs_folder/$current_run_log_file"

View file

@ -515,6 +515,8 @@ configurator_compress_multi_game_dialog() {
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \ zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator Utility - Compression in Progress" --title "RetroDECK Configurator Utility - Compression in Progress"
configurator_generic_dialog "The compression process is complete!"
configurator_compress_games_dialog
else else
if [[ ! -z $choice ]]; then # User clicked "Compress All" if [[ ! -z $choice ]]; then # User clicked "Compress All"
local post_compression_cleanup=$(configurator_compression_cleanup_dialog) local post_compression_cleanup=$(configurator_compression_cleanup_dialog)