Albums and playlists now loading using processes
This commit is contained in:
@ -177,6 +177,18 @@ export function getLibraryPlaylists(){
|
||||
}
|
||||
}
|
||||
|
||||
export function getLibraryAlbums(){
|
||||
return {
|
||||
type: 'GET_LIBRARY_ALBUMS'
|
||||
}
|
||||
}
|
||||
|
||||
export function getLibraryArtists(){
|
||||
return {
|
||||
type: 'GET_LIBRARY_ARTISTS'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Assets loaded
|
||||
|
||||
@ -264,6 +264,26 @@ const CoreMiddleware = (function(){
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'GET_LIBRARY_ALBUMS':
|
||||
if (store.getState().spotify.connected){
|
||||
store.dispatch(spotifyActions.getLibraryAlbums())
|
||||
}
|
||||
if (store.getState().mopidy.connected){
|
||||
store.dispatch(mopidyActions.getLibraryAlbums())
|
||||
}
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'GET_LIBRARY_ARTISTS':
|
||||
if (store.getState().spotify.connected){
|
||||
store.dispatch(spotifyActions.getLibraryArtists())
|
||||
}
|
||||
if (store.getState().mopidy.connected){
|
||||
store.dispatch(mopidyActions.getLibraryArtists())
|
||||
}
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'RESTART':
|
||||
location.reload()
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user