(which means track 3 of 12), this method returns 3. Same as track(), but strips trailing info: if track() returns "3/12" To propagate to the file, use update_tags() or similar methods. Or force_id3v2 is TRUE, in the ID3v2 tag. Set the corresponding value in ID3v1 tag, and, if the value does not fit, Title_set(), artist_set(), album_set(), year_set(), comment_set(), track_set(), genre_set() artist_collection()Īccess the corresponding fields returned by parse() method of CDDB_File.Īccess the corresponding methods of "ID3v2", "Inf" or "CDDB_File". The first element being the value, the second the tag (ID3v2 or ID3v1 orĬomment_collection(), comment_track(), title_track(). It returns an empty string if no year is found. If none present, will try CDDB file, then. If no year is found there, it tries to find it in a ID3v1-tag, $year = $mp3->year() # empty string unless found The first element being the value, the second the tag (ID3v2 or ID3v1) from If an optional argument 'from' is given, returns an array reference with You can change the order of this with the config() command. If no comment is found there, it tries to find it in a ID3v1-tag, ID3v1-tag, or an ID3v2-tag (from "COMM" frame with empty field),ĬDDB file (from "EXTD" or "EXTT" fields), or. $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 |