diff --git a/update-mp3-albums b/update-mp3-albums new file mode 100755 index 0000000..240acf1 --- /dev/null +++ b/update-mp3-albums @@ -0,0 +1,12 @@ +#!/usr/bin/ruby + +base = "/pegasus/pub/music/artists" +mp3s = `find #{base} -name '*.mp3' -print0`.split("\0") + +mp3s.each do |mp3| + path = mp3.split("/") + album = path[-2] + command = %W[id3tag -A #{album} #{mp3}] + puts "#{mp3} ==> '#{album}'" + system(*command) +end