mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-25 06:56:15 +02:00
renamed "System" to "Server"
This commit is contained in:
parent
eb99b52c5e
commit
b4701fb0fe
5 changed files with 12 additions and 11 deletions
|
@ -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'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue