mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-23 14:06:14 +02:00
renamed "System" to "Server"
This commit is contained in:
parent
eb99b52c5e
commit
b4701fb0fe
5 changed files with 12 additions and 11 deletions
|
@ -26,11 +26,11 @@ def setVolume(client, volume):
|
|||
requestId = requestId + 1
|
||||
|
||||
volume = int(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"]:
|
||||
setVolume(client['MAC'], volume)
|
||||
|
||||
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'] + ", name: " + client['name'] + ", conntect: " + str(client['connected']) + ", volume: " + str(client['volume']['percent']))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue