Add update-mp3-albums
This commit is contained in:
1 parent
783a9fc3d4
commit
00a046be78
1 file changed
+12
Executable
+12
@@ -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
|
||||||
Reference in new issue
Block a user