* Fix speex tagging. (Closes issue 19).
[clinton/abcde.git] / abcde
diff --git a/abcde b/abcde
index 749a86a..6281693 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -1133,11 +1133,10 @@ do_encode ()
                                                *=*) ;;
                                                *)   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