diff --git a/controllers/mattchbox_usb.py b/controllers/mattchbox_usb.py index 18123dd..328c15c 100644 --- a/controllers/mattchbox_usb.py +++ b/controllers/mattchbox_usb.py @@ -87,7 +87,7 @@ class MattchBox(Controller): if line == 255: self.ser.write(b"\xff") # Send 255 back. elif line in [1, 3, 5]: - self.sendToPlayer(int(line / 2), "PLAY") + self.sendToPlayer(int(line / 2), "PLAYPAUSE") elif line in [2, 4, 6]: self.sendToPlayer(int(line / 2) - 1, "STOP") except Exception: diff --git a/player.py b/player.py index 1f2ee80..cafc804 100644 --- a/player.py +++ b/player.py @@ -890,6 +890,7 @@ class Player: # Unpause, so we don't jump to 0, we play from the current pos. "PLAY": lambda: self._retMsg(self.unpause()), "PAUSE": lambda: self._retMsg(self.pause()), + "PLAYPAUSE": lambda: self._retMsg(self.unpause() if not self.isPlaying else self.pause()), # For the hardware controller. "UNPAUSE": lambda: self._retMsg(self.unpause()), "STOP": lambda: self._retMsg(self.stop(user_initiated=True)), "SEEK": lambda: self._retMsg(