Fixed vorbis commenting.

This commit is contained in:
Svend Sorensen
2004-09-13 17:48:46 +00:00
parent 905d596847
commit c1ea44a174

View File

@@ -9,7 +9,9 @@ cue_file=""
# Vorbis Comments # Vorbis Comments
vorbis() 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 # space seperated list of recomended stardard field names
# see http://www.xiph.org/ogg/vorbis/doc/v-comment.html # see http://www.xiph.org/ogg/vorbis/doc/v-comment.html
@@ -35,7 +37,7 @@ vorbis()
CONTACT='' CONTACT=''
ISRC='%i %u' ISRC='%i %u'
for field in $fields; do (for field in $fields; do
value="" value=""
for conv in `eval echo \\$$field`; do for conv in `eval echo \\$$field`; do
value=`$CUEPRINT -n $1 -t "$conv\n" $cue_file` value=`$CUEPRINT -n $1 -t "$conv\n" $cue_file`
@@ -46,9 +48,9 @@ vorbis()
done done
if [ -n "$value" ]; then if [ -n "$value" ]; then
echo $VORBISCOMMENT -t "$field=$value" $2 echo "$field=$value"
fi fi
done done) | $VORBISCOMMENT -c - $2
} }
id3() id3()