Playlist loader; Logging; Mopidy search
This commit is contained in:
@ -143,6 +143,25 @@ const MopidyMiddleware = (function(){
|
||||
instruct( socket, store, action.call, action.value )
|
||||
break;
|
||||
|
||||
// send an instruction to the websocket
|
||||
case 'MOPIDY_URISCHEMES':
|
||||
var uri_schemes = action.data
|
||||
var remove = ['http','https','mms','rtmp','rtmps','rtsp','sc','yt','spotify']
|
||||
|
||||
// remove all our ignored types
|
||||
for( var i = 0; i < remove.length; i++ ){
|
||||
var index = uri_schemes.indexOf(remove[i])
|
||||
if( index > -1 ) uri_schemes.splice(index, 1);
|
||||
}
|
||||
|
||||
// append with ':' to make them a mopidy URI
|
||||
for( var i = 0; i < uri_schemes.length; i++ ){
|
||||
uri_schemes[i] = uri_schemes[i] +':'
|
||||
}
|
||||
|
||||
store.dispatch({ type: 'MOPIDY_URISCHEMES_FILTERED', data: uri_schemes });
|
||||
break;
|
||||
|
||||
case 'MOPIDY_PLAY_TRACKS':
|
||||
|
||||
// add our first track
|
||||
|
||||
Reference in New Issue
Block a user