forked from platypush/platypush
Restored retry logic in mpd backend
This commit is contained in:
parent
156e2e8b5a
commit
89ea4798bf
1 changed files with 20 additions and 16 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue