(no subject)
Oct. 22nd, 2007 08:50 pmWell, without the module working against me at every turn, that was actually incredibly easy.
I don't have a good way to replace the album frame; it requires either a human reader or a smarter parser than I can write. So I just copy the description to the comments frame, where I can read it from within iTunes, and type in the album myself when and if the spirit moves me.
#!/usr/bin/env ruby
require 'id3lib'
ARGV.each {|file|
song = ID3Lib::Tag.new(file)
song.remove_frame(:____) # <== This is actually a bug, or at least a really questionable feature, but it's totally working in my favor this time.
song.remove_frame(:TALB)
song.set_frame_text(:COMM, song.frame_text(:TIT3))
song.remove_frame(:TIT3)
song.update!
}I don't have a good way to replace the album frame; it requires either a human reader or a smarter parser than I can write. So I just copy the description to the comments frame, where I can read it from within iTunes, and type in the album myself when and if the spirit moves me.
no subject
Date: 2007-10-23 06:13 pm (UTC)no subject
Date: 2007-10-23 08:06 pm (UTC)Sure would suck if I was trying to make a song a podcast instead of vice-versa, though.