- def _detects_var_artists_album(self, album, artist):
- """Detects either an album is a "Various Artists" or a
- single artist release."""
- art_first_track = None
- for track in self.player.find_album(artist, album):
- if not art_first_track: # set artist for the first track
- art_first_track = track.artist
- alb_art = track.albumartist
- # Special heuristic used when AlbumArtist is available
- if (alb_art):
- if artist == alb_art:
- # When album artist field is similar to the artist we're
- # looking an album for, the album is considered good to
- # queue
- return False
- else:
- self.log.debug(track)
- self.log.debug('album art says "%s", looking for "%s",'
- ' not queueing this album' %
- (alb_art, artist))
- return True
- return False
-