NAME

Apache::MP3::Sorted - Generate sorted streamable directories of MP3 files

SYNOPSIS

# httpd.conf or srm.conf
AddType audio/mpeg    mp3 MP3

# httpd.conf or access.conf
<Location /songs>
  SetHandler perl-script
  PerlHandler Apache::MP3::Sorted
  PerlSetVar  SortField     Title
  PerlSetVar  Fields        Title,Artist,Album,Duration
</Location>

DESCRIPTION

Apache::MP3::Sorted subclasses Apache::MP3 to allow for sorting of MP3 listings by various criteria. See Apache::MP3 for details on installing and using.

CUSTOMIZING

This class adds one new Apache configuration variable, SortField. This is the name of the field to sort by default when the MP3 file listing is first displayed, after which the user can change the sort field by clicking on the column headers.

The value of SortField may be the name of any of the fields in the listing, such as Title, Description, Album or Duration. Example:

PerlSetVar SortField Title

Sorry, but sorting on multiple fields is not supported at this time.

METHODS

Apache::MP3::Sorted overrides the following methods:

sort_mp3s()  mp3_table_header()   mp3_list_bottom()

It adds one new method:

$field = $mp3->sort_field

Returns the name of the field to sort on by default.

BUGS

Let me know.

SEE ALSO

Apache::MP3, MP3::Info, Apache

AUTHOR

Copyright 2000, Lincoln Stein <lstein@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.