def status(device): # Create PLAY/PAUSE message msg = new_msg() msg["cmd"] = "STATUS" msg["device"] = device # Send message to Command Center s = libcc.client_send_recv(msg) # Return String version of JSON packet return json.dumps(s)
def status(device): # Create PLAY/PAUSE message msg = new_msg() msg["cmd"]="STATUS" msg["device"]=device # Send message to Command Center s = libcc.client_send_recv(msg) # Return String version of JSON packet return json.dumps(s)
def play_pause(device): # Create PLAY/PAUSE message msg = new_msg() msg["cmd"] = "PLAYPAUSE" msg["device"] = device # Send message to Command Center ret = libcc.client_send_recv(msg) if "error" in ret: return "Error Toggling Playback: " + repr(ret) else: return "Playback Toggled"
def play_pause(device): # Create PLAY/PAUSE message msg = new_msg() msg["cmd"] = "PLAYPAUSE" msg["device"] = device # Send message to Command Center ret = libcc.client_send_recv(msg) if "error" in ret: return "Error Toggling Playback: "+repr(ret) else: return "Playback Toggled"
def skip(device, percent): # Create Jump message msg = new_msg() msg["cmd"] = "SKIP" msg["percent"] = percent msg["device"] = device # Send message to Command Center ret = libcc.client_send_recv(msg) if "error" in ret: return "Error Skipping: " + repr(ret) else: return "Skipped to percent: " + str(percent)
def skip(device,percent): # Create Jump message msg = new_msg() msg["cmd"] = "SKIP" msg["percent"] = percent msg["device"] = device # Send message to Command Center ret = libcc.client_send_recv(msg) if "error" in ret: return "Error Skipping: "+repr(ret) else: return "Skipped to percent: "+str(percent)
def load_video(device, key): # Create "LOAD" message msg = new_msg() msg["cmd"] = "LOAD" msg["key"] = key msg["device"] = device # Send message to Command Center and get response ret = libcc.client_send_recv(msg) if "error" in ret: return "Error Loading Video: " + repr(ret) else: return "Video Loaded"
def load_video(device,key): # Create "LOAD" message msg = new_msg() msg["cmd"] = "LOAD" msg["key"] = key msg["device"] = device # Send message to Command Center and get response ret = libcc.client_send_recv(msg) if "error" in ret: return "Error Loading Video: "+repr(ret) else: return "Video Loaded"