Add update-mp3-albums
This commit is contained in:
parent
783a9fc3d4
commit
00a046be78
12
update-mp3-albums
Executable file
12
update-mp3-albums
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user