[music.mopidy] Fixed parsing of new_state upon playback_state_changed.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabio Manganiello 2024-04-05 03:45:23 +02:00
parent b1498bfc28
commit c31180dae8
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -324,13 +324,13 @@ class MopidyClient(Thread):
def on_state_change(self, msg: dict, *_, **__):
state = msg.get('new_state')
if state == PlayerState.PLAY:
if state == 'playing':
self._status.state = PlayerState.PLAY
self._post_event(MusicPlayEvent)
elif state == PlayerState.PAUSE:
elif state == 'paused':
self._status.state = PlayerState.PAUSE
self._post_event(MusicPauseEvent)
elif state == PlayerState.STOP:
elif state == 'stopped':
self._status.state = PlayerState.STOP
self._post_event(MusicStopEvent)