--- Album.pm 2007-03-11 19:29:00.000000000 -0700 +++ Slim/Schema/Album.pm 2007-05-22 12:51:43.668534900 -0700 @@ -113,26 +113,39 @@ sub displayAsHTML { } # Show the artist in the album view - my $showContributor = ($sort && $sort =~ /^contributor\.namesort/); + my $showArtists = ($sort && $sort =~ /^contributor\.namesort/); - if (Slim::Utils::Prefs::get('showArtist') || $showContributor) { + if (Slim::Utils::Prefs::get('showArtist') || $showArtists) { # XXX - only show the contributor when there are multiple # contributors in the album view. # if ($form->{'hierarchy'} ne 'contributor,album,track') { - if (my $contributor = $self->contributors->first) { + my @artists = $self->artists; - $form->{'artist'} = $contributor; - #$form->{'includeArtist'} = defined $findCriteria->{'artist'} ? 0 : 1; - $form->{'noArtist'} = Slim::Utils::Strings::string('NO_ARTIST'); - - if ($showContributor) { - # override default field for anchors with contributor.namesort - $$anchortextRef = $contributor->namesort; - } + if (@artists) { + + $form->{'artist'} = $artists[0]; + #$form->{'includeArtist'} = defined $findCriteria->{'artist'} ? 0 : 1; + $form->{'noArtist'} = Slim::Utils::Strings::string('NO_ARTIST'); + + if ($showArtists) { + # override default field for anchors with contributor.namesort + $$anchortextRef = $artists[0]->namesort; } - # } + } + + my @info; + + for my $contributor (@artists) { + push @info, { + 'artist' => $contributor, + 'name' => $contributor->name, + 'attributes' => 'contributor.id=' . $contributor->id, + }; + } + + $form->{'artistsWithAttributes'} = \@info; } my $Imports = Slim::Music::Import->importers; @@ -210,6 +223,7 @@ sub artistsWithAttributes { push @artists, { 'artist' => $artist, + 'name' => $artist->name, 'attributes' => join('&', @attributes), }; }