MPD_sima v0.14.4
- * …
+ * Fixed blacklisting for Random plugin (Closes #14)
-- kaliko jack <kaliko@azylum.org> UNRELEASED
names = list()
for art in result.names:
if cls.database.get_bl_artist(art, add_not=True):
- cls.log.debug('Blacklisted "{0}"'.format(art))
+ cls.log.debug('Blacklisted "%s"', art)
continue
names.append(art)
if not names:
played_art = self.get_played_artist()
while artists:
art = random.choice(artists)
+ if self.daemon.sdb.get_bl_artist(art, add_not=True):
+ self.log.debug('Random: Blacklisted "%s"', art)
+ continue
if art not in played_art:
break
artists.pop(art)