From c1ea44a174b8d6b1c01f3e69937b8f026fd665e2 Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Mon, 13 Sep 2004 17:48:46 +0000 Subject: [PATCH] Fixed vorbis commenting. --- tools/cuetag.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/cuetag.sh b/tools/cuetag.sh index b00cd62..1c1ea4d 100755 --- a/tools/cuetag.sh +++ b/tools/cuetag.sh @@ -9,7 +9,9 @@ cue_file="" # Vorbis Comments vorbis() { - VORBISCOMMENT=vorbiscomment + # -w to overwrite existing comments + # -a to append to existing comments + VORBISCOMMENT="vorbiscomment -w" # space seperated list of recomended stardard field names # see http://www.xiph.org/ogg/vorbis/doc/v-comment.html @@ -35,7 +37,7 @@ vorbis() CONTACT='' ISRC='%i %u' - for field in $fields; do + (for field in $fields; do value="" for conv in `eval echo \\$$field`; do value=`$CUEPRINT -n $1 -t "$conv\n" $cue_file` @@ -46,9 +48,9 @@ vorbis() done if [ -n "$value" ]; then - echo $VORBISCOMMENT -t "$field=$value" $2 + echo "$field=$value" fi - done + done) | $VORBISCOMMENT -c - $2 } id3()