Service tiles; Start handling disabled services

This commit is contained in:
James Barnsley
2017-08-03 21:26:33 +12:00
parent 6d32e83cac
commit 123fe51289
15 changed files with 194 additions and 196 deletions

View File

@ -218,7 +218,7 @@ const MopidyMiddleware = (function(){
case 'MOPIDY_URISCHEMES':
var uri_schemes = action.data
var remove = ['http','https','mms','rtmp','rtmps','rtsp','sc','spotify']
var remove = ['http','https','mms','rtmp','rtmps','rtsp','sc']
// remove all our ignored types
for( var i = 0; i < remove.length; i++ ){
@ -279,10 +279,12 @@ const MopidyMiddleware = (function(){
// it's a spotify playlist that we haven't loaded
// we need to fetch via HTTP API to avoid timeout
} else if (helpers.uriSource(action.uri) == 'spotify'){
} else if (helpers.uriSource(action.uri) == 'spotify' && store.getState().spotify.enabled){
store.dispatch(uiActions.startProcess('MOPIDY_ENQUEUE_URIS', 'Fetching tracks'))
store.dispatch(spotifyActions.getAllPlaylistTracks(action.uri))
break
// Not in index, and Spotify HTTP not enabled, so just play it as-is
}
// fetch the playlist tracks via backend