From 88706f0a1a79e669068162d6a38d9820afacbe64 Mon Sep 17 00:00:00 2001 From: kaliko Date: Thu, 7 May 2020 17:35:56 +0200 Subject: [PATCH] Fixed bug in MPD client reconnection --- doc/Changelog | 2 +- sima/core.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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() -- 2.39.5