+ # In random play mode use complete playlist to filter
+ if self.player.playmode.get('random'):
+ queued_artists = MetaContainer([trk.Artist for trk in self.player.playlist])
+ else:
+ queued_artists = MetaContainer([trk.Artist for trk in self.player.queue])
+ self.log.trace('Already queued: {}'.format(queued_artists))
+ self.log.trace('Candidate: {}'.format(ret))
+ if ret & queued_artists:
+ self.log.debug('Removing already queued artists: '
+ '{0}'.format('/'.join(map(str, ret & queued_artists))))
+ ret = ret - queued_artists
+ if self.player.current and self.player.current.Artist in ret:
+ self.log.debug('Removing current artist: {0}'.format(self.player.current.Artist))
+ ret = ret - MetaContainer([self.player.current.Artist])