]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
change: refactor if else
authorBastian Dehn <hhaalo@arcor.de>
Sat, 12 Dec 2020 21:21:34 +0000 (22:21 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 12 Dec 2020 21:22:07 +0000 (22:22 +0100)
albentohandy

index 44dc8328a32986828374fd519f9c6d8d315b4656..f48d187401135e98d44352ff4c95771be01064f4 100755 (executable)
@@ -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