Looking into transition between processes

This commit is contained in:
James Barnsley
2019-03-19 20:55:21 +13:00
parent 46b8225655
commit 38aa95ae9b
7 changed files with 2270 additions and 2965 deletions

View File

@ -604,7 +604,7 @@ const MopidyMiddleware = (function(){
// Spotify-provied playlists need to be handled by the Spotify service
// We only need to load them if we haven't already got all the tracks
if (playlist.provider == 'spotify' && playlist.tracks_total == playlist.tracks_uris.length){
if (playlist.provider == 'spotify' && playlist.tracks_total != playlist.tracks_uris.length){
store.dispatch(spotifyActions.getAllPlaylistTracks(action.uri, action.shuffle, 'play'));
break;
}
@ -649,7 +649,7 @@ const MopidyMiddleware = (function(){
// Spotify-provied playlists need to be handled by the Spotify service
// We only need to load them if we haven't already got all the tracks
if (playlist.provider == 'spotify' && playlist.tracks_total == playlist.tracks_uris.length){
if (playlist.provider == 'spotify' && playlist.tracks_total != playlist.tracks_uris.length){
store.dispatch(spotifyActions.getAllPlaylistTracks(action.uri, action.shuffle, 'enqueue', action.play_next));
break;
}

View File

@ -1712,12 +1712,16 @@ export function getAllPlaylistTracksProcessor(data){
uris = helpers.shuffle(uris);
}
// We don't bother "finishing", we just want it "finished" immediately
// This bypasses the fade transition for a more smooth transition between two
// processes that flow together
dispatch(uiActions.processFinished('SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR'));
if (data.callback_action == 'enqueue'){
dispatch(mopidyActions.enqueueURIs(uris, data.uri, data.play_next, data.at_position, data.offset));
} else {
dispatch(mopidyActions.playURIs(uris, data.uri));
}
dispatch(uiActions.processFinishing('SPOTIFY_GET_ALL_PLAYLIST_TRACKS_PROCESSOR'))
}
},
error => {