]> kaliko git repositories - mpd-sima.git/commitdiff
Avoid randomizing in album queue mode
authorkaliko <efrim@azylum.org>
Sun, 1 Dec 2013 18:13:04 +0000 (19:13 +0100)
committerkaliko <efrim@azylum.org>
Sun, 1 Dec 2013 18:13:04 +0000 (19:13 +0100)
sima/core.py
sima/plugins/internal/lastfm.py
sima/utils/config.py

index 87501e83b7d8bc60a616c252229f401d3bfc571e..7decbb242d84dab536037ae7ade66229345434cc 100644 (file)
@@ -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)
 
index b28d34e679482da4e2bccd37cd688b61310fdbba..bff015b5550d151b855c533e541ee73e0aecf682 100644 (file)
@@ -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):
index 5d62505a972d0f9857d27ac55c53c00559e030b4..46bddf67954ff39223f89b15dd0d87bf1b409c40 100644 (file)
@@ -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': "",