X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Finternal%2Fcrop.py;h=8f70acd7caf42d703bf75b6feeb339404dd37757;hb=2b3bf3f5cef4ed9ff9e418b27194d89ca7e66b67;hp=ac8dd46e1098194ef9d15ec776e7327f946e7598;hpb=751e07b3e43a4812c29f1c89f03e58023278b634;p=mpd-sima.git diff --git a/sima/plugins/internal/crop.py b/sima/plugins/internal/crop.py index ac8dd46..8f70acd 100644 --- a/sima/plugins/internal/crop.py +++ b/sima/plugins/internal/crop.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2013, 2014, 2015 Jack Kaliko +# Copyright (c) 2013-2015, 2020 kaliko # # This file is part of sima # @@ -21,13 +21,13 @@ """ # standard library import -#from select import select # third parties components # local import from ...lib.plugin import Plugin + class Crop(Plugin): """ Crop playlist on next track @@ -50,14 +50,14 @@ class Crop(Plugin): 'expecting an integer, not "%s"', target) else: self.target = int(target) - self.log.debug('Cropping at 15') + self.log.debug('Cropping at %s', self.target) def callback_next_song(self): if not self.target: return if not self.daemon.enabled: self.log.debug('Queueing disabled, not cropping') - return False + return player = self.daemon.player if player.currentsong().pos > self.target: self.log.debug('cropping playlist')