Blob Blame History Raw
Index: abcde
===================================================================
--- abcde	(revision 290)
+++ abcde	(working copy)
@@ -1121,11 +1121,10 @@
 						*=*) ;;
 						*)   COMMENT="COMMENT=$COMMENT" ;;
 					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
-					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" --comment "$COMMENT" "$IN" "$OUT"
+				# 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:+--comment "$COMMENT"} "$IN" "$OUT"
 				else
 					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS "$IN" "$OUT"
 				fi
@@ -1140,8 +1139,8 @@
 				$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