diff -pruN 2.3.99.6-1/abcde 2.3.99.6-1ubuntu2/abcde --- 2.3.99.6-1/abcde 2006-08-05 20:14:00.000000000 +0100 +++ 2.3.99.6-1ubuntu2/abcde 2007-10-18 16:24:45.000000000 +0100 @@ -1070,8 +1070,8 @@ do_encode () esac COMMENT="--comment \"$COMMENT\"" fi - # Quick hack to avoid tagging Ogg/Speex, since there is no other way to tag than inline tagging - if [ ! "$DOTAG" = "y" ]; then + # Tag the file at encode time, as it can't be done after encoding. + if [ "$DOTAG" = "y" ]; then $RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" "$COMMENT" "$IN" "$OUT" else $RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS "$IN" "$OUT" @@ -1087,8 +1087,8 @@ do_encode () $RUN_COMMAND nice $EFFECTIVE_NICE $MPPENCODER $MPPENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" "$IN" "$OUT" ;; m4a) - # Quick hack to avoid tagging Ogg/Speex, since there is no other way to tag than inline tagging - if [ ! "$DOTAG" = "y" ]; then + # Tag the file at encode time, as it can't be done after encoding. + if [ "$DOTAG" = "y" ]; then $RUN_COMMAND nice $EFFECTIVE_NICE $AACENCODER $AACENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" -o "$OUT" "$IN" else @@ -3221,14 +3221,17 @@ if [ "$ONETRACK" = "y" ]; then else while [ $# -gt 0 ]; do # Range parsing code courtesy of Vincent Ho - RSTART=$(echo $1 | cut -f1 -d-) - REND=$(echo $1 | cut -f2 -d-) - if [ "$RSTART" = "$REND" ]; then - NEWTRACKS="$RSTART" + # Cleaned up to use shell built-ins by Charles Steinkuehler + if [ "${1#*[^0-9-]}" != "$1" ]; then + log error "syntax error while processing track numbers" else - NEWTRACKS=$(f_seq_line $RSTART $REND) + RSTART=${1%%-*} + REND=${1##*-} + while [ ${RSTART:=1} -le ${REND:=0} ] ; do + TRACKQUEUE="$TRACKQUEUE $RSTART" + RSTART=$(( $RSTART + 1 )) + done fi - TRACKQUEUE=$(echo "$TRACKQUEUE" "$NEWTRACKS") shift done fi @@ -3249,7 +3252,11 @@ DOMOVE=n DOREPLAYGAIN=n DOPLAYLIST=n DOCLEAN=n -DOCUE=n + +# Don't clobber the -M command-line flag. +if [ -z "$DOCUE" ]; then + DOCUE=n +fi for ACTION in $(echo $ACTIONS | tr , \ ) do