13 lines
268 B
Ruby
Executable File
13 lines
268 B
Ruby
Executable File
#!/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
|