Revamp of backend method structure; Proxy for any URL

This commit is contained in:
James Barnsley
2017-10-04 16:47:15 +13:00
parent dcdecd989a
commit b2c7478cf9
12 changed files with 370 additions and 96 deletions

View File

@ -1685,10 +1685,14 @@ const MopidyMiddleware = (function(){
if (action.data && action.data.track){
// Fire off our universal track index loader
store.dispatch({ type: 'TRACK_LOADED', key: action.data.track.uri, track: action.data.track })
store.dispatch({
type: 'TRACK_LOADED',
key: action.data.track.uri,
track: action.data.track
});
// We've got Spotify running, and it's a spotify track - go straight to the source!
if (helpers.uriSource(action.data.track.uri) == 'spotify' && store.getState().spotify.access != 'none'){
if (helpers.uriSource(action.data.track.uri) == 'spotify' && store.getState().spotify.enabled){
store.dispatch(spotifyActions.getTrack(action.data.track.uri))
// Some other source, rely on Mopidy backends to do their work