$comment = $mp3->comment() # empty string unless foundĬomment() returns comment information. (Deprecated name 'song' can be used instead of 'title' as well.) Tag ( "ID3v2" or "ID3v1" or "Inf" or "CDDB_File" or "Cue" or "filename") from which Track number, artist, album name, the file comment, the year and genre) areĪrray references with the first element being the value, the second the If an optional argument 'from' is given, the returned values (title, 'comment' and/or 'year' and/or 'genre' too. If comment, year or genre are found, the hash will have keys Has four keys 'title', 'track', 'artist' and 'album' where the information is You can change the order of lookup with the config() command.Īutoinfo() returns an array with the information or a hashref. The comment, year and genreĪre found differently, via the "comment", "year" and "genre" methods. The title, track number, artist, album name. If these are not present either, it will use the filename to retrieve If this cannot be found it tries to find a ID3v1-tag, then It will as default first try to find a ID3v2-tag to get this Information from an ID3v1-tag, an ID3v2-tag, from CDDB file, from. ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo() Īutoinfo() returns information about the title, track number,Īrtist, album name, the file comment, the year and genre. This can be also called as MP3::Tag->genres This function is only a shortcut to MP3::Tag::ID3v1->genres. Returns a list of all genres (reference to an array), or the according Normally this is doneĪutomatically by the module, so that you do not need to do this. You can use close() to explicitly close a file. Moment ID3v1 and ID3v2 are supported as tagname. Use MP3::Tag $mp3 = MP3::Tag->new($filename) # get some information about the file in the easiest way ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo() # Or: $comment = $mp3->comment() $dedicated_to = $mp3->select_id3v2_frame_by_descr('COMM(fre,fra,eng,#0)') $mp3->title_set('New title') # Edit in-memory copy $mp3->select_id3v2_frame_by_descr('TALB', 'New album name') # Edit in memory $mp3->select_id3v2_frame_by_descr('RBUF', $n1, $n2, $n3) # Edit in memory $mp3->update_tags(.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |