7211d86
--- abcde-2.3.99.7.orig/abcde
7211d86
+++ abcde-2.3.99.7/abcde
7211d86
@@ -1116,9 +1116,10 @@
e201ec4
 					esac	
e201ec4
 					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
7211d86
-					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" "$COMMENT" "$IN" "$OUT"
e201ec4
+				# Tag the file at encode time, as it can't be done after encoding.
e201ec4
+				if [ "$DOTAG" = "y" ]; then
7211d86
+					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" --comment "$COMMENT" "$IN" "$OUT"
7211d86
+
e201ec4
 				else
e201ec4
 					$RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS "$IN" "$OUT"
7211d86
 				fi
7211d86
@@ -1133,8 +1134,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