Example #1
0
    def execute(self, emit=True):
        super().execute(emit)

        layout = Application().layout
        for cue in layout.get_cues(cue_class=MediaCue):
            if self['pause_mode']:
                cue.media.pause()
            else:
                cue.media.stop()
    def execute(self, emit=True):
        super().execute(emit)

        layout = Application().layout
        for cue in layout.get_cues(cue_class=MediaCue):
            if not set(cue['groups']).isdisjoint(self['groups']):
                if self['action'] == self.ACTION_PLAY:
                    cue.media.play()
                elif self['action'] == self.ACTION_PAUSE:
                    cue.media.pause()
                elif self['action'] == self.ACTION_STOP:
                    cue.media.stop()
                elif self['action'] == self.ACTION_AUTO:
                    cue.execute()