package artistlist;
use strict;
use Globals;
use Globals qw(%PLATTERS);
use Globals qw(@MUSIC);
use Globals qw(@VIDEO);
use Globals qw($target);
use Globals qw($delim);
use Globals qw($bgcolour);
sub new {
my $self = {
mime => "text/html",
playlist => openTemplate("search"),
artistSearch => 0,
section => undef,
shortcuts => '
',
count => 0};
# show the logo if this is a new page
my $logo;
$logo = '
' if ($target eq '_top');
$self->{playlist} =~ s/%LOGO%/$logo/;
$self->{playlist} =~ s/%BGCOLOUR%/$bgcolour/;
bless ($self);
return $self;
}
sub desc {
return "Artist Search Results";
}
sub header {
my $self = shift;
}
sub track {
my ($self, $abc, $artist) = @_;
$artist = $abc if !$artist;
my $firstletter = substr($abc, 0, 1);
if ($firstletter ne $self->{section}) {
$self->{playlist} .= '
"; $self->{section} = $firstletter; $self->{shortcuts} .= ''.$firstletter.' '; } my $realength = $artist; $realength=~s/&[^;]*;/x/g; $realength = (int(length($realength) / 20) +1)*120; $self->{playlist} .= "
"; $self->{count}++; } sub dump { my $self = shift; $self->{playlist} .= "\n$REPORT