From 607ec2812c863ce5c24c9418dc52f8f25ef28dd9 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 16 Apr 2018 09:38:34 +0200 Subject: [PATCH] Run get_plugin at every iteration of the mpd backend in case the plugin lost the connection and has been reloaded --- platypush/backend/music/mpd/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/music/mpd/__init__.py b/platypush/backend/music/mpd/__init__.py index 6da2edb5f4..6797ba9723 100644 --- a/platypush/backend/music/mpd/__init__.py +++ b/platypush/backend/music/mpd/__init__.py @@ -24,12 +24,12 @@ class MusicMpdBackend(Backend): def run(self): super().run() - plugin = get_plugin('music.mpd') last_state = None last_track = None last_playlist = None while not self.should_stop(): + plugin = get_plugin('music.mpd') status = plugin.status().output track = plugin.currentsong().output state = status['state'].lower()