[music.mopidy] Fixed parsing of `new_state` upon `playback_state_changed`.
continuous-integration/drone/push Build is passing Details

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
1 changed files with 3 additions and 3 deletions

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)