From e57ad82b3ea44bb887b6979ff16f8b8658a98a6d Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 12 Dec 2020 22:21:34 +0100 Subject: [PATCH] change: refactor if else --- albentohandy | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/albentohandy b/albentohandy index 44dc832..f48d187 100755 --- a/albentohandy +++ b/albentohandy @@ -371,19 +371,19 @@ ConvertProcess() printf "create symlinks of flac's in %s\n" "$WORK" MakeSymlinksToWork "$WORK" "$MUSICPATH" "$albumlist" - if [ $mp3 == false ] && [ $flac == false ]; then - printf "\nPhase %02d of %02d: flac -> ogg\n" \ - $((curphase++)) $phase - ConvertCoverToMeta "$WORK" "$parallelopts" - ConvertFlacToOgg "$WORK" "$parallelopts" - elif [ $mp3 == true ] && [ $flac == false ]; then + if [ $mp3 == true ]; then printf "\nPhase %02d of %02d: flac -> mp3\n" \ $((curphase++)) $phase ConvertFlacToMp3 "$WORK" "$parallelopts" - elif [ $mp3 == false ] && [ $flac == true ]; then + elif [ $flac == true ]; then printf "\nPhase %02d of %02d: flac -> flac with cover\n" \ $((curphase++)) $phase PictureToFlac "$WORK" + else + printf "\nPhase %02d of %02d: flac -> ogg\n" \ + $((curphase++)) $phase + ConvertCoverToMeta "$WORK" "$parallelopts" + ConvertFlacToOgg "$WORK" "$parallelopts" fi printf "\nPhase %02d of %02d: cleanup\n\n" $((curphase++)) $phase -- 2.47.3