[LAU] Generic ipod: ogg vorbis tag name weirdness

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-user@...>
Date: Tuesday, October 5, 2010 - 11:59 am

My imitation ipod plays oggs. They all seemed to be tagged correctly,
but some always showed up as Unknown Artist etc.

Couldn't figure it out till I looked at the tags with vorbiscomment.
THe only difference was that the 'Unknown' files had tagnames in lower
case, like title=badum-badum. Known files had TITLE=etc.

Here's a short script to fix this up, and add discnumber tag for good
measure (which my player seem to need)

#! /bin/bash
# capitalise tag names on today's ogg files
# add discnumber tag if not already there

for ogg in $(find . -mtime -1 -name '*.ogg'); do
vorbiscomment -l $ogg | sed 's/.*=/\U&/g' > "$1{1%%.ogg}.tag"
if [ `grep -c DISCNUMBER $1{1%%.ogg}.tag` -eq 0 ]
then
echo "DISCNUMBER=1" >> "$1{1%%.ogg}.tag"
fi
vorbiscomment -w -c "$1{1%%.ogg}.tag" $ogg
rm -f "$1{1%%.ogg}.tag"
done

The discnumber tag could be added with vorbiscomment's -a flag, but oh
well...

I got the temporary file bit from some guy on the Arch forums, so thanks
whoever you are.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

This is the only confirmed message in this thread.