From: Bastian Dehn Date: Sat, 12 Dec 2020 21:21:34 +0000 (+0100) Subject: change: refactor if else X-Git-Tag: v1.0.0^2~62 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=e57ad82b3ea44bb887b6979ff16f8b8658a98a6d;p=albentohandy.git change: refactor if else --- 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