NAME
Tag - Perl extension reading tags of mp3 files
SYNOPSIS
use Tag;
$mp3 = MP3::Tag->new($filename);
$mp3->getTags;
if (exists $mp3->{ID3v1}) {
$id3v1 = $mp3->{ID3v1};
print $id3v1->song;
...
}
if (exists $mp3->{ID3v2}) {
($name, $info) = $mp3->{ID3v2}->getFrame("TIT2");
...
}
AUTHOR
Thomas Geffert, thg@users.sourceforge.net
DESCRIPTION
Tag is a wrapper module to read different tags of mp3 files. It provides an easy way to access the functions of seperate moduls which do the handling of reading/writing the tags itself.
At the moment MP3::TAG::ID3v1 and MP3::TAG::ID3v2 are supported.
!! As this is only a beta version, it is very likely that the design !! of this wrapper module will change soon !!
- new
-
$mp3 = MP3::TAG->new($filename);
Creates a mp3-object, which can be used to retrieve/set different tags.
- getTags
-
@tags = $mp3->getTags;
Checks which tags can be found in the mp3-object. It returns a list @tags which contains strings identifying the found tags.
Each found tag can be accessed then with $mp3->{tagname} .
Use the information found in MP3::TAG::ID3v1 and MP3::TAG::ID3v2 to see what you can do with the tags.
- newTag
-
$mp3->newTag($tagname);
Creates a new tag of the given type $tagname. You can access it then with $mp3->{$tagname}
- genres
-
@allgenres = $mp3->genres; $genreName = $mp3->genres($genreID); $genreID = $mp3->genres($genreName);
Returns a list of all genres, or the according name or id to a given id or name.
This function is only a shortcut to MP3::TAG::ID3v1->genres.
SEE ALSO
MP3::TAG::ID3v1, MP3::TAG::ID3v2
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 224:
You forgot a '=back' before '=head1'