From: kaliko Date: Sun, 1 Dec 2013 18:13:04 +0000 (+0100) Subject: Avoid randomizing in album queue mode X-Git-Tag: mpd-sima/0.12.0pr2~21 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=cd78ebfec21926f231f7b5f1430d31baee4b60c4;p=mpd-sima.git Avoid randomizing in album queue mode --- diff --git a/sima/core.py b/sima/core.py index 87501e8..7decbb2 100644 --- a/sima/core.py +++ b/sima/core.py @@ -82,7 +82,6 @@ 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) diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index b28d34e..bff015b 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -387,6 +387,8 @@ class Lastfm(Plugin): self.queue_mode() candidates = self.to_add self.to_add = list() + if self.plugin_conf.get('queue_mode') != 'album': + random.shuffle(candidates) return candidates def callback_player_database(self): diff --git a/sima/utils/config.py b/sima/utils/config.py index 5d62505..46bddf6 100644 --- a/sima/utils/config.py +++ b/sima/utils/config.py @@ -43,17 +43,19 @@ DEFAULT_CONF = { 'MPD': { 'host': "localhost", #'password': "", - 'port': "6600"}, + 'port': "6600", + }, 'sima': { 'internal': "Crop, History, MpdOptions, Lastfm, RandomFallBack", 'contrib': "", 'user_db': "false", 'history_duration': "8", 'queue_length': "1", - 'consume': "0",}, + }, 'daemon':{ 'daemon': "false", - 'pidfile': "",}, + 'pidfile': "", + }, 'log': { 'verbosity': "info", 'logfile': "",