From f38fc8a02af12c3ea1225a4a01125f59140287ed Mon Sep 17 00:00:00 2001 From: mdb Date: Sun, 3 Mar 2002 05:46:54 +0000 Subject: [PATCH] Updated to use id3v2. git-svn-id: https://samskivert.googlecode.com/svn/trunk@619 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- projects/robodj/bin/setid3 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/projects/robodj/bin/setid3 b/projects/robodj/bin/setid3 index 1b97ba89..633f2223 100755 --- a/projects/robodj/bin/setid3 +++ b/projects/robodj/bin/setid3 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: setid3,v 1.1 2002/03/03 05:02:57 mdb Exp $ +# $Id: setid3,v 1.2 2002/03/03 05:46:54 mdb Exp $ # # A script for setting the id3 tags of the MP3 files in the RoboDJ # repository. The data from the database must be dumped into two files: @@ -42,14 +42,15 @@ while () { split("\t"); # escape our arguments - $album = escape($entries{$entryid}->[0]); - $artist = escape($entries{$entryid}->[1]); - $title = escape($title); + $album = $entries{$entryid}->[0]; + $artist = $entries{$entryid}->[1]; # invoke the command - my $cmd = "id3 -t $title -a $artist -A $album " . - "-T $position $location > /dev/null"; - warn "\nFailed to set tag on $songid\n" unless (system($cmd) == 0); + my @cmd = ("id3v2", "--song", "$title", + "--artist", "$artist", + "--album", "$album", + "--track", "$position", "$location"); + warn "\nFailed to set tag on $songid\n" unless (system(@cmd) == 0); if ($counter++ % 100 == 99) { print ".";