From c31180dae87759b5c6b94e779b889910dea0ef99 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 5 Apr 2024 03:45:23 +0200 Subject: [PATCH] [music.mopidy] Fixed parsing of `new_state` upon `playback_state_changed`. --- platypush/plugins/music/mopidy/_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/plugins/music/mopidy/_client.py b/platypush/plugins/music/mopidy/_client.py index 26616a330f..0369312792 100644 --- a/platypush/plugins/music/mopidy/_client.py +++ b/platypush/plugins/music/mopidy/_client.py @@ -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)