Beispiel #1
0
def status(message, sender):
    volume = speakermanager.getVolume()
    bass = speakermanager.getBass()
    try:
        songName = speakermanager.getTrackInfo()
    except:
        songName = False
    message = """
Volume: %(volume)d
Bass: %(bass)s
Song: %(song)s
"""
    bassCap = speakermanager.getBassCapabilities()
    if not songName:
        song = "None"
    else:
        song = songName[0] + " by " + songName[2]
        data = {
            "volume": volume,
            "bass": str(bass) + " out of " + bassCap[1],
            "song": song
        }
        sendtext(
            sender,
            config['DEFAULT']['ai_name'] + ": Basis Status" + message % data)
Beispiel #2
0
def volume(message, number):
    curVol = speakermanager.getVolume()
    if message.isdigit():
        speakermanager.setVolume(message)
        sendtext(number, config['DEFAULT']['ai_name'] + ": " + "Result volume: " + str(message))
    elif message == "up":
        speakermanager.setVolume(curVol + 5)
        sendtext(number, config['DEFAULT']['ai_name'] + ": " + "You sent a volume up command")
    elif message == "down":
        speakermanager.setVolume(curVol - 5)
        sendtext(number, config['DEFAULT']['ai_name'] + ": " + "You sent a volume down command")
Beispiel #3
0
def volume(message, number):
    curVol = speakermanager.getVolume()
    if message.isdigit():
        speakermanager.setVolume(message)
        sendtext(
            number, config['DEFAULT']['ai_name'] + ": " + "Result volume: " +
            str(message))
    elif message == "up":
        speakermanager.setVolume(curVol + 5)
        sendtext(
            number, config['DEFAULT']['ai_name'] + ": " +
            "You sent a volume up command")
    elif message == "down":
        speakermanager.setVolume(curVol - 5)
        sendtext(
            number, config['DEFAULT']['ai_name'] + ": " +
            "You sent a volume down command")
Beispiel #4
0
def status(message, sender):
    volume = speakermanager.getVolume()
    bass = speakermanager.getBass()
    try:
        songName = speakermanager.getTrackInfo()
    except:
        songName = False
    message = """
Volume: %(volume)d
Bass: %(bass)s
Song: %(song)s
"""
    bassCap = speakermanager.getBassCapabilities()
    if not songName:
        song = "None"
    else:
        song = songName[0] + " by " + songName[2]
        data = {"volume": volume, "bass": str(bass) + " out of " + bassCap[1], "song": song}
        sendtext(sender, config['DEFAULT']['ai_name'] + ": Basis Status" + message%data)