5487c74
Index: abcde
5487c74
===================================================================
5487c74
--- abcde	(revision 290)
5487c74
+++ abcde	(working copy)
5487c74
@@ -1121,11 +1121,10 @@
5487c74
 						*=*) ;;
5487c74
 						*)   COMMENT="COMMENT=$COMMENT" ;;
e201ec4
 					esac	
5487c74
-					COMMENT="--comment \"$COMMENT\""
e201ec4
 				fi
e201ec4
-				# Quick hack to avoid tagging Ogg/Speex, since there is no other way to tag than inline tagging
e201ec4
-				if [ ! "$DOTAG" = "y" ]; then
5487c74
-					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" --comment "$COMMENT" "$IN" "$OUT"
e201ec4
+				# Tag the file at encode time, as it can't be done after encoding.
e201ec4
+				if [ "$DOTAG" = "y" ]; then
5487c74
+					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" ${COMMENT:+--comment "$COMMENT"} "$IN" "$OUT"
e201ec4
 				else
e201ec4
 					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS "$IN" "$OUT"
7211d86
 				fi
5487c74
@@ -1140,8 +1139,8 @@
e201ec4
 				$RUN_COMMAND nice $EFFECTIVE_NICE $MPPENCODER $MPPENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" "$IN" "$OUT"
e201ec4
 				;;
e201ec4
 			m4a)
e201ec4
-				# Quick hack to avoid tagging Ogg/Speex, since there is no other way to tag than inline tagging
e201ec4
-				if [ ! "$DOTAG" = "y" ]; then
e201ec4
+				# Tag the file at encode time, as it can't be done after encoding.
e201ec4
+				if [ "$DOTAG" = "y" ]; then
e201ec4
 					$RUN_COMMAND nice $EFFECTIVE_NICE $AACENCODER $AACENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" -o "$OUT" "$IN"
e201ec4
 					
e201ec4
 				else