+ candidates = self.player.find_tracks(album)
+ if self.plugin_conf.getboolean('shuffle_album'):
+ random.shuffle(candidates)
+ # this allows to select a maximum number of track from the album
+ # a value of 0 (default) means keep all
+ nbtracks = self.plugin_conf.getint('track_to_add_from_album')
+ if nbtracks > 0:
+ candidates = candidates[0:nbtracks]
+ self.to_add.extend(candidates)