OUTPUTFILEDIR=$(dirname "$OUTPUTDIR/$OUTPUTFILE")
# mkdir -p shouldn't return an error if the directory already exists
mkdir -p "$OUTPUTFILEDIR"
- vecho "Moving $ABCDETEMPDIR/track$1.$OUTPUT to $OUTPUTDIR/$OUTPUTFILE.$OUTPUT"
+ # Silence the Moving output since it overlaps with encoding processes...
+ #run_command '' vecho "Moving track$1.$OUTPUT to $OUTPUTDIR/$OUTPUTFILE.$OUTPUT"
run_command movetrack-$1 mv "$ABCDETEMPDIR/track$1.$OUTPUT" "$OUTPUTDIR/$OUTPUTFILE.$OUTPUT"
# Lets move the cue file
if CUEFILE=$(checkstatus cuefile) >/dev/null ; then
if [ -r "$ABCDETEMPDIR/$CUEFILE" ]; then
if checkstatus movecue-$OUTPUT; then :; else
- vecho "Copying cue file to its destination directory..."
+ # Silence the Copying output since it overlaps with encoding processes...
+ #run_command '' vecho "Copying cue file to its destination directory..."
if checkstatus onetrack >/dev/null ; then
case $OUTPUT in
# NOTE: Creating a cue file with the 3-char-extension files is to comply with
cdparanoia|debug)
if [ "$WEHAVEACD" = "y" ]; then
vecho "Querying the CD for audio tracks..."
- CDPARANOIAOUTPUT="$( $CDROMREADER -d $CDROM -Q --verbose 2>&1 )"
+ CDPARANOIAOUTPUT="$( $CDROMREADER -$CDPARANOIACDROMBUS $CDROM -Q --verbose 2>&1 )"
RET=$?
if [ ! "$RET" = "0" ];then
echo "Warning: Something went wrong while querying the CD... Maybe a DATA CD?"
# If that fails, check for a vi
elif which vi >/dev/null 2>&1; then
vi "$CDDBDATA"
+ elif [ -x /usr/bin/vim ]; then
+ /usr/bin/vim "$CDDBDATA"
elif [ -x /usr/bin/vi ]; then
/usr/bin/vi "$CDDBDATA"
+ elif [ -x /bin/vi ]; then
+ /bin/vi "$CDDBDATA"
# nano should be on all (modern, i.e., sarge) debian systems
elif which nano >/dev/null 2>&1 ; then
nano "$CDDBDATA"
fi
case "$CDROMREADERSYNTAX" in
cdparanoia)
- nice $READNICE $CDROMREADER -d $CDROM ${READTRACKNUMS:-$UTRACKNUM} "$FILEARG" $REDIR ;;
+ nice $READNICE $CDROMREADER -$CDPARANOIACDROMBUS $CDROM ${READTRACKNUMS:-$UTRACKNUM} "$FILEARG" $REDIR ;;
cdda2wav)
if [ "$OSFLAVOUR" = "OSX" ] ; then
# Hei, we have to unmount the device before running anything like cdda2wav in OSX
else
false
fi ;;
- debug) nice $READNICE $CDROMREADER -d $CDROM -w $UTRACKNUM-[:1] "$FILEARG" $REDIR
+ debug) nice $READNICE $CDROMREADER -$CDPARANOIACDROMBUS $CDROM -w $UTRACKNUM-[:1] "$FILEARG" $REDIR
;;
esac
RETURN=$?
:
}
+# post_read
+# Empty post_read function, to be defined in the configuration file.
+post_read ()
+{
+:
+}
+
###############################################################################
# End of functions
#
# If using scsi devices, cdda2wav needs a CDROMID, instead of a device node
# i.e. CDROMID="1,0,0"
CDROMID=""
+# If we are using the IDE bus, we need CDPARANOIACDROMBUS defined as "d"
+# If we are using the ide-scsi emulation layer, we need to define a "g"
+CDPARANOIACDROMBUS="d"
# program paths - defaults to checking your $PATH
# mp3
echo NEXTTRACK
fi
+# Execute the user-defined post_read funtion before ejecting CD
+post_read
+
# We are now finished with the cdrom - it can be safely ejected. Note that
# abcde will not have completed yet.
if [ "$EJECTCD" = "y" ] && [ -x $(which $EJECT) ]; then