GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Tag::File(3) User Contributed Perl Documentation Tag::File(3)

MP3::Tag::File - Module for reading / writing files

  my $mp3 = MP3::Tag->new($filename);

  ($song, $artist, $no, $album) = $mp3->read_filename();

see MP3::Tag

MP3::Tag::File is designed to be called from the MP3::Tag module.

It offers possibilities to read/write data from files.

read_filename()

  ($song, $artist, $no, $album) = $mp3->read_filename($what, $filename);

read_filename() tries to extract information about artist, song, song number and album from the filename.

This is likely to fail for a lot of filenames, especially the album will be often wrongly guessed, as the name of the parent directory is taken as album name.

$what and $filename are optional. $what maybe song, track, artist or album. If $what is defined read_filename will return only this element.

If $filename is defined this filename will be used and not the real filename which was set by MP3::Tag with "MP3::Tag-"new($filename)>.

Following formats will be hopefully recognized:

- album name/artist name - song name.mp3

- album_name/artist_name-song_name.mp3

- album.name/artist.name_song.name.mp3

- album name/(artist name) song name.mp3

- album name/01. artist name - song name.mp3

- album name/artist name - 01 - song.name.mp3

song()

 $song = $mp3->song($filename);

Returns the song name, guessed from the filename. See also read_filename()

$filename is optional and will be used instead of the real filename if defined.

artist()

 $artist = $mp3->artist($filename);

Returns the artist name, guessed from the filename. See also read_filename()

$filename is optional and will be used instead of the real filename if defined.

track()

 $track = $mp3->track($filename);

Returns the track number, guessed from the filename. See also read_filename()

$filename is optional and will be used instead of the real filename if defined.

album()

 $album = $mp3->artist($album);

Returns the album name, guessed from the filename. See also read_filename() The album name is guessed from the parent directory, so it is very likely to fail.

$filename is optional and will be used instead of the real filename if defined.

Hey! The above document had some coding errors, which are explained below:
Around line 29:
You can't have =items (as at line 131) unless the first thing after the =over is an =item

=over without closing =back

2001-08-06 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.