Buildout; Play all library tracks, fixes #250

This commit is contained in:
James Barnsley
2018-02-14 08:22:08 +13:00
parent 4721e2d3b9
commit 7611788ebd
11 changed files with 2239 additions and 1063 deletions

View File

@ -307,14 +307,14 @@ const MopidyMiddleware = (function(){
// make sure we didn't get this playlist from Mopidy-Spotify
// if we did, we'd have a cached version on server so no need to fetch
if (!store.getState().core.playlists[action.uri].is_mopidy){
store.dispatch(spotifyActions.getPlaylistTracksForPlaying(action.uri))
store.dispatch(spotifyActions.getPlaylistTracksAndPlay(action.uri))
break
}
// 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' && store.getState().spotify.enabled){
store.dispatch(spotifyActions.getPlaylistTracksForPlaying(action.uri))
store.dispatch(spotifyActions.getPlaylistTracksAndPlay(action.uri))
break
// Not in index, and Spotify HTTP not enabled, so just play it as-is