mirror of
https://github.com/badaix/snapcast.git
synced 2025-09-25 00:45:40 +08:00
renamed "System" to "Server"
This commit is contained in:
@ -39,7 +39,7 @@ if sys.argv[2] == "setVolume":
|
||||
print("usage: control.py <SERVER HOST> setVolume <VOLUME>")
|
||||
exit(0)
|
||||
volume = int(sys.argv[3])
|
||||
j = doRequest(json.dumps({'jsonrpc': '2.0', 'method': 'System.GetStatus', 'id': 1}), 1)
|
||||
j = doRequest(json.dumps({'jsonrpc': '2.0', 'method': 'Server.GetStatus', 'id': 1}), 1)
|
||||
for client in j["result"]["clients"]:
|
||||
setVolume(client['MAC'], volume)
|
||||
|
||||
@ -52,7 +52,7 @@ elif sys.argv[2] == "setName":
|
||||
else:
|
||||
print("unknown command \"" + sys.argv[2] + "\"")
|
||||
|
||||
j = doRequest(json.dumps({'jsonrpc': '2.0', 'method': 'System.GetStatus', 'id': 1}), 1)
|
||||
j = doRequest(json.dumps({'jsonrpc': '2.0', 'method': 'Server.GetStatus', 'id': 1}), 1)
|
||||
for client in j["result"]["clients"]:
|
||||
print("MAC: " + client['MAC'] + ", conntect: " + str(client['connected']) + ", volume: " + str(client['volume']['percent']) + ", name: " + client['name'] + ", host: " + client['host'])
|
||||
|
||||
|
Reference in New Issue
Block a user