With the block list, player.find_tracks might return an empty list.
continue
nb_album_add += 1
candidates = self.player.find_tracks(album)
+ if not candidates:
+ continue
if self.plugin_conf.getboolean('shuffle_album'):
random.shuffle(candidates)
# this allows to select a maximum number of track from the album
for artist in artists:
self.log.debug('looking for %s', artist)
tracks = self.player.find_tracks(artist)
- trk = self.filter_track(tracks)
+ if not tracks:
+ continue
+ trk = self.filter_track(tracks, candidates)
if not trk:
continue
if queue_mode == 'track':
for artist in artists:
self.log.debug('looking for %s', artist)
tracks = self.player.find_tracks(artist)
- trk = self.filter_track(tracks)
+ if not tracks:
+ continue
+ trk = self.filter_track(tracks, candidates)
if not trk:
continue
if queue_mode == 'track':