Restored retry logic in mpd backend

This commit is contained in:
Fabio Manganiello 2019-01-09 22:20:01 +01:00
parent 156e2e8b5a
commit 89ea4798bf

View file

@ -50,6 +50,9 @@ class MusicMpdBackend(Backend):
plugin = None
while not self.should_stop():
success = False
while not success:
try:
plugin = get_plugin('music.mpd')
if not plugin:
@ -62,6 +65,7 @@ class MusicMpdBackend(Backend):
track = plugin.currentsong().output
state = status['state'].lower()
playlist = status['playlist']
success = True
except StopIteration:
pass
except Exception as e: