]> kaliko git repositories - mpd-sima.git/commitdiff
crop: disable cropping when queuing is
authorkaliko <kaliko@azylum.org>
Sun, 30 Aug 2015 07:40:00 +0000 (09:40 +0200)
committerkaliko <kaliko@azylum.org>
Sun, 30 Aug 2015 07:40:00 +0000 (09:40 +0200)
sima/plugins/internal/crop.py

index fd0656c8542395a819be38512e33364c5e903da3..f6ba32e87c19721de75b99a38f09311fd634620b 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (c) 2013, 2014 Jack Kaliko <kaliko@azylum.org>
+# Copyright (c) 2013, 2014, 2015 Jack Kaliko <kaliko@azylum.org>
 #
 #  This file is part of sima
 #
@@ -55,6 +55,9 @@ class Crop(Plugin):
     def callback_next_song(self):
         if not self.target:
             return
+        if not self._Plugin__daemon.enabled:
+            self.log.debug('Queueing disabled, not cropping')
+            return False
         player = self._Plugin__daemon.player
         if player.currentsong().pos > self.target:
             self.log.debug('cropping playlist')