Digesting snapcast structure into iris-friendly structure

This commit is contained in:
James Barnsley
2018-03-21 22:08:53 +13:00
parent 40bee2f982
commit ce0c41516a
5 changed files with 183 additions and 14 deletions

View File

@ -52,7 +52,12 @@ export default function reducer(pusher = {}, action){
return Object.assign({}, pusher, { upgrading: true });
case 'PUSHER_SNAPCAST':
return Object.assign({}, pusher, { snapcast: action.snapcast });
return Object.assign({}, pusher, { snapcast_clients: action.snapcast_clients, snapcast_groups: action.snapcast_groups });
case 'PUSHER_SNAPCAST_CLIENT_UPDATED':
var snapcast_clients = Object.assign({}, pusher.snapcast_clients);
snapcast_clients[action.key] = Object.assign({}, snapcast_clients[action.key], action.client);
return Object.assign({}, pusher, { snapcast_clients: snapcast_clients });
default:
return pusher