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
|
#!/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
|
# 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:
|
# repository. The data from the database must be dumped into two files:
|
||||||
@@ -42,14 +42,15 @@ while (<SONGS>) {
|
|||||||
split("\t");
|
split("\t");
|
||||||
|
|
||||||
# escape our arguments
|
# escape our arguments
|
||||||
$album = escape($entries{$entryid}->[0]);
|
$album = $entries{$entryid}->[0];
|
||||||
$artist = escape($entries{$entryid}->[1]);
|
$artist = $entries{$entryid}->[1];
|
||||||
$title = escape($title);
|
|
||||||
|
|
||||||
# invoke the command
|
# invoke the command
|
||||||
my $cmd = "id3 -t $title -a $artist -A $album " .
|
my @cmd = ("id3v2", "--song", "$title",
|
||||||
"-T $position $location > /dev/null";
|
"--artist", "$artist",
|
||||||
warn "\nFailed to set tag on $songid\n" unless (system($cmd) == 0);
|
"--album", "$album",
|
||||||
|
"--track", "$position", "$location");
|
||||||
|
warn "\nFailed to set tag on $songid\n" unless (system(@cmd) == 0);
|
||||||
|
|
||||||
if ($counter++ % 100 == 99) {
|
if ($counter++ % 100 == 99) {
|
||||||
print ".";
|
print ".";
|
||||||
|
|||||||
Reference in New Issue
Block a user