diff options
Diffstat (limited to 'tag-tracks')
| -rwxr-xr-x | tag-tracks | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -3,7 +3,17 @@ require 'taglib' require 'fileutils' -Dir.chdir("/media/hdd/music/Youtube Downloads") +if ARGV.empty? + puts "ERROR: no argument given..." + puts "usage: tag-tracks TARGET_DIR" + return 69 +end + +target_dir = ARGV.first + +Dir.chdir("#{target_dir}") + +puts "Tagging Tracks in #{Dir.pwd} ..." mp3_files = Dir.glob("*").sort_by { |x| File.basename(x).downcase } @@ -19,3 +29,5 @@ mp3_files.each do |song| track_num += 1 end end + +puts "Done!" |
