Skip to content

Instantly share code, notes, and snippets.

@levicole
Created March 18, 2011 00:20
Show Gist options
  • Select an option

  • Save levicole/875407 to your computer and use it in GitHub Desktop.

Select an option

Save levicole/875407 to your computer and use it in GitHub Desktop.
update mp3 artist ID3 tag
require 'rubygems'
require 'id3lib'
Dir.glob("./*.mp3").each do |mp3|
puts "updating #{mp3}"
tag = ID3Lib::Tag.new(mp3)
tag.artist = "artist name"
if tag.update!
puts "#{mp3} updated!"
else
puts "Not sure what happened, but #{mp3} is screwed"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment