The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Audio::DB::Parse::ReadFiles.pm

Glean information on music files directly from their ID3 tags.

DESCRIPTION

Audio::DB::Parse::ReadFiles.pm is used internally by Audio::DB. It's internal, private methods will be called when trying to create or update a music database using the 'dirs' option:

      $mp3->load_database(-dirs =>['/path/to/MP3s/'],
                          -tmp  =>'/tmp/');

All methods of Audio::DB::Parse::ReadFiles are private (for now). You will never need to interact with Audio::DB::Parse::ReadFiles objects directly.

REQUIRES

MP3::Info for reading ID3 tags, LWP::MediaTypes for distinguising types of readable files;

EXPORTS

No methods are exported.

METHODS

No public methods available.

PRIVATE METHODS

_process_directories

 Title   : _process_directories
 Usage   : $mp3->_process_directories;
 Function: Fetches all mp3s at top level directories.
 Returns : Nothing
 Args    : none
 Status  : Private

Fetches all the mp3s within the top level directories provided during calls to the new() method. Farms off a file at a time to cache_song for processing.

_parse_tracks

 Title   : _parse_tracks
 Usage   : _parse_tracks($artist);
 Function: Splits the track tag into track and total tracks.
 Returns : track, total tracks
 Args    : raw track field from ID3 tag
 Status  : Private

AUTHOR

Copyright 2002-2004, Todd W. Harris <harris@cshl.org>.

This module is distributed under the same terms as Perl itself. Feel free to use, modify and redistribute it as long as you retain the correct attribution.

ACKNOWLEDGEMENTS

Chris Nandor <pudge@pudge.net> wrote MP3::Info, the module responsible for reading MP3 tags. Without, this module would be a best-selling pulp romance novel behind the gum at the grocery store checkout. Chris has been really helpful with issues that arose with various MP3 tags from different taggers. Kudos, dude!

Lincoln (Dr. Leichtenstein) Stein <lstein@cshl.org> wrote much of the original adaptor code as part of the l<Bio::DB::GFF> module. Much of that code is incorporated here, albeit in a pared-down form. The code for reading ID3 tags from files only with appropriate MIME-types is borrowed from his <Apache::MP3> module. This was a much more elegant than my lame solution of checking for .mp3! Lincoln tolerates having me in his lab, too, even though I use a Mac.

SEE ALSO

Audio::DB,MP3::Info