Snapcast to BEM

This commit is contained in:
James Barnsley
2018-09-24 16:10:42 +12:00
parent 1bb0c80431
commit 06f8ee9060
11 changed files with 1914 additions and 1861 deletions

View File

@ -241,6 +241,28 @@ const MopidyMiddleware = (function(){
})
break;
case 'MOPIDY_REQUEST':
request(socket, store, action.method, action.params)
.then(
response => {
if (action.response_callback){
store.dispatch(action.response_callback.call(this, response));
}
},
error => {
if (action.error_callback){
store.dispatch(action.error_callback.call(this, error));
} else {
store.dispatch(coreActions.handleException(
'Mopidy request failed',
error,
action.method,
action
));
}
}
);
break
/**
* General playback