echo ARTIST="$TRACKARTIST"
echo ALBUM="$DALBUM"
echo TITLE="$TRACKNAME"
- if [ -n "$CDYEAR" ]; then
+ if [ -n "$CDYEAR" ]; then
echo DATE="$CDYEAR"
- fi
- if [ -n "$CDGENRE" ]; then
+ fi
+ if [ -n "$CDGENRE" ]; then
echo GENRE="$CDGENRE"
- fi
+ fi
echo TRACKNUMBER=${TRACKNUM:-$1}
echo CDDB=$CDDBDISCID
if [ "$(eval echo ${COMMENT})" != "" ]; then
# done
#}
+# do_single_gain
+# variables used:
+# FIXME #
+do_single_gain ()
+{
+:
+}
+
# do_batch_gain
# variables used:
# MP3GAIN, MP3GAINOPTS, VORBISGAIN, VORBISGAINOPTS
+# FIXME #
do_batch_gain ()
{
# The commands here don't go through run_command because they're never supposed to be silenced
ALBUMFILE=$(mungefilename "$DALBUM")
ARTISTFILE=$(mungefilename "$DARTIST")
GENRE=$(mungegenre "$GENRE")
+ YEAR=${CDYEAR:-$CDYEAR}
if [ "$VARIOUSARTISTS" = "y" ] ; then
PLAYLISTFILE=$(eval echo $VAPLAYLISTFORMAT)
else
#elif [ -z "$DISCID" ]; then
if [ -z "$DISCID" ]; then
vecho -n "Getting CD track info... "
+ if [ "$OSFLAVOUR" = "OSX" ]; then
+ disktool -u ${CDROM#/dev/}
+ fi
TRACKINFO=$($CDDISCID $CDROM)
+ if [ "$OSFLAVOUR" = "OSX" ]; then
+ disktool -m ${CDROM#/dev/}
+ fi
# Make sure there's a CD in there by checking cd-discid's return code
if [ "$?" = "1" ]; then
echo "abcde error: CD could not be read. Perhaps there's no CD in the drive?" >&2
cat /dev/null > "$ABCDETEMPDIR/status"
fi
if [ X"$CUEFILE" = "Xy" -a X"$WEHAVEACD" = "Xy" ]; then
- if checkstatus cuefile ; then :; else
- $MKCUE $MKCUEOPTS > $ABCDETEMPDIR/cue-$(echo $TRACKINFO | cut -f1 -d' ').txt
- echo cuefile >> "$ABCDETEMPDIR/status"
+ if checkstatus cuefile >/dev/null ; then :; else
+ CUEFILE=cue-$(echo $TRACKINFO | cut -f3 -d' ').txt
+ $MKCUE $MKCUEOPTS > $ABCDETEMPDIR/$CUEFILE
+ echo cuefile=$CUEFILE >> "$ABCDETEMPDIR/status"
fi
fi
# If we got the CDPARANOIA status and it is not recorded, save it now
echo "$TRACKINFO" > "$ABCDETEMPDIR/discid"
}
+# do_cleancue
+# Create a proper CUE file based on the CUE file we created before.
+do_cleancue()
+{
+ if checkstatus cuefile; then :; else
+ $CUEFILE_INPUT="$ABCDETEMPDIR/cue-$(echo $TRACKINFO | cut -f1 -d' ').txt"
+ ### FIXME ### checkstatus cddb
+ if [ "$DOCDDB" = "y" ]; then
+ MARKER
+ fi
+ fi
+}
+
# do_cddbparse
# Parses a CDDB file and outputs the title and the track names.
# Variables: CDDBFILE
:
}
+# do_movecue
+# Standalone function to move the CUE file to the final location
+
###############################################################################
# End of functions
#
OSFLAVOUR=OSX
# We should have disktool in OSX, but let's be sure...
NEEDDISKTOOL=y
+ CDROMREADERSYNTAX=cddafs
elif [ X$(uname) = "XOpenBSD" ] ; then
HTTPGET=wget
MD5SUM=md5
fi
) &
done
+
+# Lets move the cue file
+if checkstatus cuefile >/dev/null ; then
+ do_movecue
+fi
+
# Go through it again and make sure there's no distmp3 stragglers, otherwise
# we'll delete the files they're working on
## FIXME ## Check also for files which are encoded using PIPEs.