From 40fb9f181730470fc4cf5ab8c1d5e52f768d68df Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 3 Mar 2023 09:57:15 -0500 Subject: [PATCH] tag-mp3s: replace title and images --- tag-mp3s | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tag-mp3s b/tag-mp3s index 00cccfa..884b1d1 100755 --- a/tag-mp3s +++ b/tag-mp3s @@ -9,11 +9,11 @@ def process_mp3(mp3_path) dirname = File.dirname(mp3_path) current_info, stderr, status = Open3.capture3("id3info", mp3_path) current_info.force_encoding("ASCII-8BIT") - if current_info =~ /TIT2\s.*: (.*)/ - title = $1 - else + #if current_info =~ /TIT2\s.*: (.*)/ + # title = $1 + #else title = File.basename(mp3_path).sub(/\.mp3$/, "") - end + #end artist = File.basename(File.dirname(File.dirname(mp3_path))) album = File.basename(File.dirname(mp3_path)) if current_info =~ /TYER\s.*: (.*)/ @@ -33,8 +33,9 @@ def process_mp3(mp3_path) args += %W[--track=#{track_number}] if track_number args += %W[--release-year=#{year}] if year # 2017 Outback likes to show picture for OTHER but not FRONT_COVER... - args += %W[--add-image=#{album_art}:OTHER] if album_art + #args += %W[--add-image=#{album_art}:OTHER] if album_art args += [mp3_path] + system("eyeD3", "--remove-all", mp3_path) system("eyeD3", *args) end