Loading library albums only on demand
This commit is contained in:
@ -167,6 +167,17 @@ export function addTracksToPlaylist( uri, tracks_uris ){
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Asset libraries
|
||||
**/
|
||||
|
||||
export function getLibraryPlaylists(){
|
||||
return {
|
||||
type: 'GET_LIBRARY_PLAYLISTS'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Assets loaded
|
||||
**/
|
||||
|
||||
@ -254,6 +254,16 @@ const CoreMiddleware = (function(){
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'GET_LIBRARY_PLAYLISTS':
|
||||
if (store.getState().spotify.connected){
|
||||
store.dispatch(spotifyActions.getLibraryPlaylists())
|
||||
}
|
||||
if (store.getState().mopidy.connected){
|
||||
store.dispatch(mopidyActions.getLibraryPlaylists())
|
||||
}
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'RESTART':
|
||||
location.reload()
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user