Generic ipod: ogg vorbis tag name weirdness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user


[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux