Beispiel #1
0
    def delete(self):
        """
        Go to the previous track.

        """
        backed_up = applescript.run('previous track')
        self.set_status(204) if backed_up else self.set_status(500)
        self.write('')
Beispiel #2
0
    def post(self):
        """
        Go to the next track.

        """
        skipped = applescript.run('next track')
        self.set_status(204) if skipped else self.set_status(500)
        self.write('')
Beispiel #3
0
    def post(self):
        """
        Go to the next track.

        """
        play_toggled = applescript.run("play pause")
        self.set_status(204) if play_toggled else self.set_status(500)
        self.write("")
Beispiel #4
0
    def delete(self):
        """
        Turn down the current system volume.

        """
        turned_down = applescript.run('volume down')
        self.set_status(204) if turned_down else self.set_status(500)
        self.write('')
Beispiel #5
0
    def post(self):
        """
        Turn up the current system volume.

        """
        turned_up = applescript.run('volume up')
        self.set_status(204) if turned_up else self.set_status(500)
        self.write('')
Beispiel #6
0
    def post(self):
        """
        Toggle mute on/off.

        """
        muted = applescript.run('mute toggle')
        self.set_status(204) if muted else self.set_status(500)
        self.write('')