Attempt storing full release date

This commit is contained in:
josh committed 2026-10-26 11:56:48 -04:00
1 parent b1539e8985
commit 6d97a84bf9
1 file changed
+10 -3
+10 -3
View File
@@ -23,17 +23,24 @@ artist = gets.chomp
$stdout.write("Album: ")
album = gets.chomp
$stdout.write("Year: ")
year = gets.chomp
$stdout.write("Release year: ")
date = gets.chomp
#$stdout.write("Release date (YYYY-MM-DD): ")
#date = gets.chomp
#unless date =~ /^\d{4}-\d{2}-\d{2}$/
# $stderr.puts "Unexpected date format"
# exit 1
#end
files.each do |file|
if file =~ /^(\d+)\s*(.*)\.mp3$/
track_number, title = $1.to_i, $2
command = %w[kid3-cli]
command += ["-c", "revert", "-c", "save"]
command += ["-c", %[set artist "#{artist}" 12]]
command += ["-c", %[set title "#{title}" 12]]
command += ["-c", %[set album "#{album}" 12]]
command += ["-c", %[set date "#{year}" 12]]
command += ["-c", %[set date "#{date}" 12]]
command += ["-c", %[set track "#{track_number}" 12]]
command += ["-c", %[set picture:albumart.jpg 'Front Cover' 2]]
command += ["-c", "save"]