From: kaliko Date: Thu, 26 Jun 2014 11:17:41 +0000 (+0200) Subject: Add random.shuffle to track list X-Git-Tag: 0.12.2~9 X-Git-Url: http://git.kaliko.me/?a=commitdiff_plain;h=346e6d1b7a710ee401a03749f22ed8ac4146661d;p=mpd-sima.git Add random.shuffle to track list --- diff --git a/sima/lib/webserv.py b/sima/lib/webserv.py index 5e78785..30a7eac 100644 --- a/sima/lib/webserv.py +++ b/sima/lib/webserv.py @@ -326,6 +326,7 @@ class WebService(Plugin): self.log.info('{0.name} ratelimit: {0.ratelimit}'.format(self.ws)) for trk in titles: found = self.player.fuzzy_find_track(artist.name, trk.title) + random.shuffle(found) if found: self.log.debug('{0}'.format(found[0])) if self.filter_track(found): @@ -340,6 +341,7 @@ class WebService(Plugin): self.log.debug('Trying to find titles to add for "{}"'.format( artist)) found = self.player.find_track(artist) + random.shuffle(found) if not found: self.log.debug('Found nothing to queue for {0}'.format(artist)) continue