Ejemplo n.º 1
0
    def send_command(self, command):
        if not os.path.exists(self.FIFO):
            return

        cmd = {
            'play': 'act_songpausetoggle',
            'pause': 'act_songpausetoggle',
            'next': 'act_songnext',
            'volup': 'act_volup',
            'voldn': 'act_voldown',
        }.get(command)

        if cmd:
            process_fifo(self.FIFO, self.config[cmd])
            return True
Ejemplo n.º 2
0
    def send_command(self, command):
        if not os.path.exists(self.FIFO):
            return

        cmd = {
            'play': 'act_songpausetoggle',
            'pause': 'act_songpausetoggle',
            'next': 'act_songnext',
            'volup': 'act_volup',
            'voldn': 'act_voldown',
        }.get(command)

        if cmd:
            process_fifo(self.FIFO, self.config[cmd])
            return True
Ejemplo n.º 3
0
    def send_command(self, command):
        if not os.path.exists(self.FIFO):
            return

        cmd = {
            "play": "pause",
            "pause": "pause",
            "next": "pt_step 1",
            "prev": "pt_step -1",
            "stop": "stop",
            "volup": "volume +5",
            "voldn": "volume -5",
        }.get(command)

        if cmd:
            process_fifo(self.FIFO, cmd)
            return True
Ejemplo n.º 4
0
    def send_command(self, command):
        if not os.path.exists(self.FIFO):
            return

        cmd = {
            'play': 'pause',
            'pause': 'pause',
            'next': 'pt_step 1',
            'prev': 'pt_step -1',
            'stop': 'stop',
            'volup': 'volume +5',
            'voldn': 'volume -5',
        }.get(command)

        if cmd:
            process_fifo(self.FIFO, cmd)
            return True
Ejemplo n.º 5
0
    def send_command(self, command):
        if not os.path.exists(self.FIFO):
            return

        cmd = {
            'play': 'pause',
            'pause': 'pause',
            'next': 'pt_step 1',
            'prev': 'pt_step -1',
            'stop': 'stop',
            'volup': 'volume +5',
            'voldn': 'volume -5',
        }.get(command)

        if cmd:
            process_fifo(self.FIFO, cmd)
            return True