From: kaliko Date: Wed, 16 Dec 2020 13:34:23 +0000 (+0100) Subject: Fixed some code style and comment X-Git-Tag: 0.16.1~16 X-Git-Url: http://git.kaliko.me/?a=commitdiff_plain;h=ee218f16c2a449c6d72d550807114676e1e96d94;p=mpd-sima.git Fixed some code style and comment --- diff --git a/sima/lib/webserv.py b/sima/lib/webserv.py index 35835c3..c6a906f 100644 --- a/sima/lib/webserv.py +++ b/sima/lib/webserv.py @@ -253,7 +253,7 @@ class WebService(Plugin): return [] tolookfor = self.player.playlist[-1].Artist self.log.info('Looking for artist similar to "%s"', tolookfor) - self.log.debug(repr(tolookfor)) + self.log.debug('%r', tolookfor) similar = self.ws_similar_artists(tolookfor) if not similar: self.log.info('Got nothing from %s!', self.ws.name) diff --git a/sima/mpdclient.py b/sima/mpdclient.py index 0d0ff1e..0c2e0b2 100644 --- a/sima/mpdclient.py +++ b/sima/mpdclient.py @@ -33,7 +33,7 @@ from .utils.leven import levenshtein_ratio class PlayerError(Exception): - """Fatal error in poller.""" + """Fatal error in the player.""" # Some decorators diff --git a/sima/plugins/internal/crop.py b/sima/plugins/internal/crop.py index 3f987ce..8f70acd 100644 --- a/sima/plugins/internal/crop.py +++ b/sima/plugins/internal/crop.py @@ -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 @@ -57,7 +57,7 @@ class Crop(Plugin): 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')