]> kaliko git repositories - mpd-sima.git/blobdiff - sima/plugins/core/mpdoptions.py
Update copyright
[mpd-sima.git] / sima / plugins / core / mpdoptions.py
index ab5a4cb458f2b6368c8a28ca528a06a4071dec31..48c2b3c89a2acd08b5d7a348d5a8a8cfbc4edabf 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (c) 2013, 2014 Jack Kaliko <kaliko@azylum.org>
+# Copyright (c) 2013, 2014 kaliko <kaliko@azylum.org>
 #
 #  This file is part of sima
 #
@@ -18,7 +18,7 @@
 #
 #
 """
-    Deal with MPD options ‑ idle and repeat mode
+    Deal with MPD options ‑ single and repeat mode
 """
 
 # standard library import
@@ -43,12 +43,14 @@ class MpdOptions(Plugin):
         Called on player changes
         """
         player = self.daemon.player
-        if player.status().get('single') == str(1):
-            self.log.info('MPD "single" mode activated.')
-            self.daemon.enabled = False
-        elif player.status().get('repeat') == str(1):
-            self.log.info('MPD "repeat" mode activated.')
-            self.daemon.enabled = False
+        if player.playmode.get('single'):
+            if self.daemon.config.getboolean('sima', 'single_disable_queue'):
+                self.log.info('MPD "single" mode activated.')
+                self.daemon.enabled = False
+        elif player.playmode.get('repeat'):
+            if self.daemon.config.getboolean('sima', 'repeat_disable_queue'):
+                self.log.info('MPD "repeat" mode activated.')
+                self.daemon.enabled = False
         else:
             if self.daemon.enabled is False:
                 self.log.debug('enabling queuing (leaving single|repeat mode)')