Phil Leigh;445278 Wrote: 
> Which queries are helped by the presence of the AA tag? - I'd like to
> test that out.

Heres' the code from \server\Slim\Schema\Album.pm


Code:
--------------------
    
  # Return an array of artists associated with this album.
  sub artists {
  my $self = shift;
  
  # First try to fetch an explict album artist
  my @artists = $self->artistsForRoles('ALBUMARTIST');
  
  # If the user wants to use TPE2 as album artist, pull that.
  if (scalar @artists == 0 && $prefs->get('useBandAsAlbumArtist')) {
  @artists = $self->artistsForRoles('BAND');
  }
  
  # Nothing there, and we're not a compilation? Get a list of artists.
  if (scalar @artists == 0 && (!$prefs->get('variousArtistAutoIdentification') 
|| !$self->compilation)) {
  @artists = $self->artistsForRoles('ARTIST');
  }
  
  # Still nothing? Use the singular contributor - which might be the $vaObj
  if (scalar @artists == 0 && $self->compilation) {
  @artists = Slim::Schema->variousArtistsObject;
  } elsif (scalar @artists == 0) {
  @artists = $self->contributors;
  }
  return @artists;
  }
  
--------------------


First see if there's an albumarist, then try band (if pref is set).  If
none found, get every artist on the album.  By having an albumartist for
the album, you essentially short-circuit this at the first query.

Actually, with the way I've tagged my library, the last

@artists = $self->contributors;

works perfectly and requires no queries at all.  I've just moved it to
the top but I don't know how much faster it is.


-- 
JJZolx

Jim
------------------------------------------------------------------------
JJZolx's Profile: http://forums.slimdevices.com/member.php?userid=10
View this thread: http://forums.slimdevices.com/showthread.php?t=65573

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to