[Slim-Checkins] r11061 - /trunk/server/Slim/Schema/Album.pm
adrian at svn.slimdevices.com
adrian at svn.slimdevices.com
Fri Dec 29 10:47:16 PST 2006
Author: adrian
Date: Fri Dec 29 10:47:16 2006
New Revision: 11061
URL: http://svn.slimdevices.com?rev=11061&view=rev
Log:
Bug: N/A
Description: ensure correct artists/contributors returned for artistsWithAttributes
Modified:
trunk/server/Slim/Schema/Album.pm
Modified: trunk/server/Slim/Schema/Album.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Schema/Album.pm?rev=11061&r1=11060&r2=11061&view=diff
==============================================================================
--- trunk/server/Slim/Schema/Album.pm (original)
+++ trunk/server/Slim/Schema/Album.pm Fri Dec 29 10:47:16 2006
@@ -110,31 +110,31 @@
}
# Show the artist in the album view
- my $showContributor = ($sort && $sort =~ /^contributor\.namesort/);
-
- if (Slim::Utils::Prefs::get('showArtist') || $showContributor) {
+ my $showArtists = ($sort && $sort =~ /^contributor\.namesort/);
+
+ 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') {
- my $contributors = $self->contributors;
-
- if (my $contributor = $contributors->first) {
-
- $form->{'artist'} = $contributor;
+ my @artists = $self->artists;
+
+ if (@artists) {
+
+ $form->{'artist'} = $artists[0];
#$form->{'includeArtist'} = defined $findCriteria->{'artist'} ? 0 : 1;
$form->{'noArtist'} = Slim::Utils::Strings::string('NO_ARTIST');
- if ($showContributor) {
+ if ($showArtists) {
# override default field for anchors with contributor.namesort
- $$anchortextRef = $contributor->namesort;
+ $$anchortextRef = $artists[0]->namesort;
}
}
my @info;
- for my $contributor ($contributors->all) {
+ for my $contributor (@artists) {
push @info, {
'artist' => $contributor,
'name' => $contributor->name,
More information about the checkins
mailing list