for OUTPUT in $( echo $OUTPUTTYPE | tr , \ )
# THE OUTPUT NEEDS TO BE CORRECTED WITH THE CONTAINER?
do
+ case $OUTPUT in
+ vorbis|ogg)
+ OUTPUT=$OGGOUTPUTCONTAINER
+ ;;
+ flac)
+ OUTPUT=$FLACOUTPUTCONTAINER
+ ;;
+ esac
OUTPUTFILES=""
for UTRACKNUM in $TRACKQUEUE
do
OUTPUTFILES="$OUTPUTDIR/$OUTPUTFILE.$OUTPUT $OUTPUTFILES"
done
case "$OUTPUT" in
- flac);;
- ogg);;
+ flac)
+ run_command replaygain-flac $METAFLAC --add-replay-gain $OUTPUTFILES
+ ;;
+ vorbis|ogg)
+ run_command replaygain-vorbis $VORBISGAIN --album $OUTPUTFILES
+ ;;
*);;
esac
- if [ "$RETURN" = "0" ]; then
- run_command replaygain-$OUTPUT true
- else
- runcommand replaygain-$OUTPUT false
- fi
done
- if checkerrors replaygain-.{3,4}; then
- run_command replaygain false
- else
+ if checkerrors replaygain-.{3,6}; then :; else
run_command replaygain true
fi
fi
;;
esac
done
- if checkerrors "tagtrack-(.{3,4})-$1"; then
- run_command tagtrack-$1 false
- else
+ if checkerrors "tagtrack-(.{3,6})-$1"; then :; else
run_command tagtrack-$1 true
fi
else
for UTRACKNUM in $TRACKQUEUE
do
- echo encodetrack-$UTRACKNUM >> status
+ run_command encodetrack-$UTRACKNUM true
done
fi
)
esac
done
# Only remove .wav if the encoding succeeded
- if checkerrors "encodetrack-(.{3,4})-$1"; then
- run_command encodetrack-$1 false
- else
+ if checkerrors "encodetrack-(.{3,6})-$1"; then :; else
run_command encodetrack-$1 true
if [ ! "$KEEPWAVS" = "y" ] ; then
rm -f "$IN"