]> kaliko git repositories - mpd-sima.git/commitdiff
Shuffles track to add
authorkaliko <efrim@azylum.org>
Mon, 4 Nov 2013 20:43:09 +0000 (21:43 +0100)
committerkaliko <efrim@azylum.org>
Mon, 4 Nov 2013 20:43:09 +0000 (21:43 +0100)
sima/core.py

index 08135c0da6e26ae0ecf85895db8b24914548f497..87501e83b7d8bc60a616c252229f401d3bfc571e 100644 (file)
@@ -6,6 +6,7 @@ __version__ = '0.12.0.b'
 __author__ = 'kaliko jack'
 __url__ = 'git://git.kaliko.me/sima.git'
 
+import random
 import sys
 import time
 
@@ -81,6 +82,7 @@ class Sima(Daemon):
                 pl_callback =  getattr(plugin, 'callback_need_track_fb')()
                 if pl_callback:
                     to_add.extend(pl_callback)
+        random.shuffle(to_add)
         for track in to_add:
             self.player.add(track)