Exemplo n.º 1
0
            del actionMgr

    elif mode[0] == MenuNavigator.COMMAND_CONTROLLER:
        log("SonosPlugin: Mode is launchController")
        xbmc.executebuiltin("ActivateWindow(home)", True)
        xbmc.executebuiltin("RunScript(script.sonos)")

    elif mode[0] == MenuNavigator.COMMAND_SPEECH_INPUT:
        log("SonosPlugin: Mode is Speech Input")
        sonosDevice = Sonos.createSonosDevice()
        # Make sure a Sonos speaker was found
        if sonosDevice is not None:
            # Create the speech class and prompt the user for the message
            speech = Speech(sonosDevice)
            msg = speech.promptForInput()
            if msg is not None:
                # Now get the Sonos Sytem to say the message
                speech.say(msg)
            del speech
            del sonosDevice

    elif mode[0] == MenuNavigator.COMMAND_SPEECH_SAVE:
        log("SonosPlugin: Mode is Speech Save")
        # Create the speech class and prompt the user for the message
        # (No need for a device to save a message)
        speech = Speech()
        speech.addPhrase()
        # Refresh the screen now that an item has been removed
        xbmc.executebuiltin("Container.Refresh")
        del speech
Exemplo n.º 2
0
            del actionMgr

    elif mode[0] == MenuNavigator.COMMAND_CONTROLLER:
        log("SonosPlugin: Mode is launchController")
        xbmc.executebuiltin("ActivateWindow(home)", True)
        xbmc.executebuiltin('RunScript(script.sonos)')

    elif mode[0] == MenuNavigator.COMMAND_SPEECH_INPUT:
        log("SonosPlugin: Mode is Speech Input")
        sonosDevice = Sonos.createSonosDevice()
        # Make sure a Sonos speaker was found
        if sonosDevice is not None:
            # Create the speech class and prompt the user for the message
            speech = Speech(sonosDevice)
            msg = speech.promptForInput()
            if msg is not None:
                # Now get the Sonos Sytem to say the message
                speech.say(msg)
            del speech
            del sonosDevice

    elif mode[0] == MenuNavigator.COMMAND_SPEECH_SAVE:
        log("SonosPlugin: Mode is Speech Save")
        # Create the speech class and prompt the user for the message
        # (No need for a device to save a message)
        speech = Speech()
        speech.addPhrase()
        # Refresh the screen now that an item has been removed
        xbmc.executebuiltin('Container.Refresh')
        del speech