diff --git a/mopidy_raspberry_gpio/frontend.py b/mopidy_raspberry_gpio/frontend.py index 097d5e2..cf10840 100644 --- a/mopidy_raspberry_gpio/frontend.py +++ b/mopidy_raspberry_gpio/frontend.py @@ -63,6 +63,12 @@ class RaspberryGPIOFrontend(pykka.ThreadingActor, core.CoreListener): 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()