diff --git a/mopidy_raspberry_gpio/frontend.py b/mopidy_raspberry_gpio/frontend.py index 097d5e2..3bd7f0d 100644 --- a/mopidy_raspberry_gpio/frontend.py +++ b/mopidy_raspberry_gpio/frontend.py @@ -62,6 +62,12 @@ class RaspberryGPIOFrontend(pykka.ThreadingActor, core.CoreListener): self.core.playback.pause() else: self.core.playback.play() + + def handle_play_stop(self, config): + if self.core.playback.get_state().get() == core.PlaybackState.PLAYING: + self.core.playback.stop() + else: + self.core.playback.play() def handle_next(self, config): self.core.playback.next()