Audio-DB
view release on metacpan or search on metacpan
# $self->authenticate();
# } else {
# $self->{cookie} = 'NOT AUTHENTICATED';
# }
#}
#
#sub build_cookie {
# my ($self,$user_id) = @_;
# # Store the user id in the object for
# # building custom page elements
# $self->{user_id} = $user_id;
#
# # Could easily store more information in the cookie, too...
# my %vals = (userid => $user_id);
# my $cookie = cookie(-name =>'musicdb',
# -value=>\%vals);
# $self->{cookie} = $cookie;
# return;
#}
#
#sub authenticate {
# my $self = shift;
# my $password = param('password');
# my $dbh = $self->dbh;
# my $sth = $dbh->prepare(qq{select password,user_id from users where username=?});
# $sth->execute(param('username'));
# my ($pass,$user_id) = $sth->fetchrow_array;
# if ($pass eq $password) {
# $self->build_cookie($user_id);
# return;
# } else {
# $self->{cookie} = 'BOGUS GUESS';
# }
#}
1;
=pod
=head1 NAME
Audio::DB::Web - Assists in web-based queries of an MP3 Database
=head1 SYNOPSIS
use Audio::DB::Web;
my $mp3->
=head1 DESCRIPTION
Audio::DB is a module for creating relational databases of MP3 files directly
from data stored in ID3 tags. Once created, Audio::DB provides various
methods for creating reports and web pages of your collection. Although
it's nutritious and delicious on its own, Audio::DB was created for use
with Apache::Audio::DB, a subclass of Apache::MP3. This module makes it
easy to make your collection web-accessible, complete with browsing,
searching, streaming, multiple users, playlists, ratings, and more!
=head1 REQUIRES
This module is designed to work with the data schema created
and loaded by B<Audio::DB>. It's not going to do you mch good without it.
=head1 EXPORTS
No methods are exported.
=head1 CAVEATS
=head1 METHODS
=head2 fetch_user_playlists();
Title : fetch_user_playlists
Usage : $mp3->fetch_user_playlists();
Function : fetches all playlists
Returns : A hash reference relating user playlist names to IDs
suitable for building forms.
Args : -filled
Status : Public
Methods:
user management
multiplaylists / user (and option to share with others)
user ratings (for songs and playlists)
browse by letter of alphabet, genre, album
Stats reporting
=head1 NAME
Apache::Audio::DB - Generate a database of your tunes complete with searchable interface and nifty statistical analyses!
=head1 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 SortFields Album,Title,-Duration
PerlSetVar Fields Title,Artist,Album,Duration
</Location>
=head1 TODO
Streaming code and links
BUILDING URLs from non-blessed items...need to handle this because
( run in 0.795 second using v1.01-cache-2.11-cpan-39bf76dae61 )