[music.mopidy] Fixed parsing of new_state
upon playback_state_changed
.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b1498bfc28
commit
c31180dae8
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue