[LAU] Generic ipod: ogg vorbis tag name weirdness

From: M Watts <zwy648rct@email-addr-hidden>
Date: Tue Oct 05 2010 - 14:57:42 EEST

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@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue Oct 5 16:15:02 2010

This archive was generated by hypermail 2.1.8 : Tue Oct 05 2010 - 16:15:02 EEST