Updated to use id3v2.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@619 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -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 (<SONGS>) {
|
||||
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 ".";
|
||||
|
||||
Reference in New Issue
Block a user