[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MP3 ID3 Tags



The module seemed to install ok but i am getting 

: Is a directory at 
/usr/lib/perl5/site_perl/5.6.0/MP3/ID3v1Tag.pm line 83, <FILES> line 14.
Can't call method "print_tag" on an undefined value at 
/usr/local/bin/tagchange.pl line 12, <FILES>
line 14.

On Thu, 23 May 2002, Mike808 wrote:

> Anyone up for a game of golf?
> 
> > #!/usr/local/bin/perl
> > use File::Find;
> > use MP3::ID3v1Tag;
> > 
> > my @directories_to_search = @ARGV;
> > find (\&wanted, @directories_to_search);
> > sub wanted {
> > 
> >   return unless m/\.mp3$/i; # Skip unless it has an MP3 extension
> > 
> >   my $mp3_file = MP3::ID3v1Tag->new($_);
> >   return unless $mp3_file; # Done if not an MP3 file
> >   return unless $mp3_file->got_tag; # Done if no tag
> > 
> >   my $genre = $mp3_file->get_genre(); # Get the current tag
> > 
> >   $mp3_file->set_genre("Blues"); # Set the tag by name
> >   $mp3_file->set_genre_num(0);   # Or use the genre numbers
> > 
> >   my $save_status = $mp3_file->save; # Save the changes
> > 
> >   print "$File::Find::name updated\n"; # Tell the user
> > }
> > 1;
> 
> 

-- 



Tim Grossner
voice - 217-438-6161
pager - 217-467-3148
cell - 217-971-3060
data - tg@cityscape.net 
(GPG/PGP key available at http://www.cityscape.net/~tg/tim.grossner.gpg or http://www.wirelessways.org/~tg/tim.grossner.gpg 
meatspace address - 202 Harrison, Auburn, Illinois 62615



-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.