# -*- coding: utf-8 -*-
-# Copyright (c) 2013, 2014, 2015 Jack Kaliko <kaliko@azylum.org>
+# Copyright (c) 2013-2015, 2020 kaliko <kaliko@azylum.org>
#
# This file is part of sima
#
class Crop(Plugin):
"""
Crop playlist on next track
- kinda MPD's consume
"""
def __init__(self, daemon):
super().__init__(daemon)
'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:
if player.currentsong().pos > self.target:
self.log.debug('cropping playlist')
while player.currentsong().pos > self.target:
- player.remove()
+ player.delete(0)
# VIM MODLINE