Skip to content

Instantly share code, notes, and snippets.

@jlapier
Created October 30, 2012 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlapier/3981563 to your computer and use it in GitHub Desktop.
Save jlapier/3981563 to your computer and use it in GitHub Desktop.
using ruby-mp3info to fix artist names in mp3 tags
# I always manage to end up with different capitalizations on artist names,
# which causes some mp3 players to see them as different artists.
# So I use ruby-mp3info to rename them
# gem install ruby-mp3info
require 'rubygems'
require 'ruby-mp3info'
# in the directory of the artist, with albums as subdirectories (change as needed)
files = Dir['*/*.mp3']
files.each do |f|
Mp3Info.open(f) do |mi|
mi.tag.artist = "Capitalization of the Band"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment