From 4796c9633ee9d27da20ba88df6b87a56ddcf5db2 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 22 Oct 2026 13:38:01 -0400 Subject: [PATCH] id3-album.rb: fail if albumart.jpg not found --- id3-album.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/id3-album.rb b/id3-album.rb index f535b2d..a278b9b 100755 --- a/id3-album.rb +++ b/id3-album.rb @@ -2,6 +2,8 @@ # Install: kid3-common +require "fileutils" + $stdout.sync = true files = Dir.glob("*.mp3").sort @@ -10,6 +12,11 @@ if files.empty? exit 1 end +unless File.exist?("albumart.jpg") + $stderr.puts "albumart.jpg not found" + exit 1 +end + $stdout.write("Artist: ") artist = gets.chomp