def sendmessagetoallclients(): MessageTitle=raw_input("Enter a title for the message:") MessageText=raw_input("Enter a message:") for connectedclient in mediaplayer.getClients(): client=PLEXClient(connectedclient['host'],connectedclient['port']) client.sendmessage(MessageTitle+","+MessageText) wait_for_enter()
def setvolume(): volume=raw_input('Enter volume for all clients (0-100):') for connectedclient in mediaplayer.getClients(): client=PLEXClient(connectedclient['host'],connectedclient['port']) client.setVolume(volume) wait_for_enter()
def getvolume(): for connectedclient in mediaplayer.getClients(): client=PLEXClient(connectedclient['host'],connectedclient['port']) print "Volume is: " + client.getVolume() wait_for_enter()