From: kaliko Date: Mon, 4 Nov 2013 20:43:09 +0000 (+0100) Subject: Shuffles track to add X-Git-Tag: mpd-sima/0.12.0pr2~26 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=f0550def23bc07bba4cfaa55d9e724f9fe7776a9;p=mpd-sima.git Shuffles track to add --- diff --git a/sima/core.py b/sima/core.py index 08135c0..87501e8 100644 --- a/sima/core.py +++ b/sima/core.py @@ -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)