From: kaliko Date: Thu, 7 May 2020 15:35:56 +0000 (+0200) Subject: Fixed bug in MPD client reconnection X-Git-Tag: 0.16.0.dev0~26 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=88706f0a1a79e669068162d6a38d9820afacbe64;hp=af58c4907a336e1c57bb591a89d17543a84585a3;p=mpd-sima.git Fixed bug in MPD client reconnection --- diff --git a/doc/Changelog b/doc/Changelog index 42a6deb..f0126f8 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,7 +1,7 @@ MPD_sima v0.15.4 UNRELEASED * Refactored random plugin - * … + * Fixed bug in MPD client reconnection -- kaliko jack diff --git a/sima/core.py b/sima/core.py index 5ec0492..ead1ba8 100644 --- a/sima/core.py +++ b/sima/core.py @@ -108,7 +108,7 @@ class Sima(Daemon): def queue(self): to_add = list() for plugin in self.plugins: - self.log.info('running %s', plugin) + self.log.info('callback_need_track: %s', plugin) pl_candidates = getattr(plugin, 'callback_need_track')() if pl_candidates: to_add.extend(pl_candidates) @@ -177,8 +177,8 @@ class Sima(Daemon): #TODO: unhandled Player exceptions self.log.warning('Unhandled player exception: %s', err) del self.player - self.player = PlayerClient() - time.sleep(10) + self.player = self.__get_player() + time.sleep(5) except PlayerError as err: self.log.warning('Player error: %s', err) self.reconnect_player()