Unpaginated local albums merged into library.albums
This commit is contained in:
@ -206,9 +206,9 @@ export default function reducer(core = {}, action){
|
||||
|
||||
return Object.assign({}, core, {
|
||||
library_albums: helpers.removeDuplicates([...library_albums, ...action.uris]),
|
||||
library_albums_spotify_more: (action.spotify_more ? action.spotify_more : null),
|
||||
library_albums_more: (action.more ? action.more : null),
|
||||
library_albums_total: (action.total ? action.total : null),
|
||||
library_albums_spotify_started: (action.spotify_started ? action.spotify_started : null),
|
||||
library_albums_started: (action.started ? action.started : null),
|
||||
});
|
||||
|
||||
case 'ALBUM_LIBRARY_CHECK':
|
||||
|
||||
@ -844,7 +844,7 @@ const MopidyMiddleware = (function(){
|
||||
|
||||
store.dispatch({
|
||||
type: 'MOPIDY_GET_ALBUMS',
|
||||
uris: uris.slice(0,50)
|
||||
uris: uris//.slice(0,50) THIS PAGINATES REQUESTS. Slow servers might need this...
|
||||
});
|
||||
|
||||
store.dispatch({
|
||||
|
||||
@ -85,9 +85,10 @@ export default function reducer(spotify = {}, action){
|
||||
}
|
||||
))
|
||||
}
|
||||
console.log(action)
|
||||
return Object.assign({}, spotify, {
|
||||
library_albums: albums,
|
||||
library_albums_more: action.data.next
|
||||
library_albums_spotify_more: action.data.next
|
||||
})
|
||||
|
||||
case 'SPOTIFY_LIBRARY_ALBUMS_LOADED_MORE':
|
||||
@ -103,7 +104,7 @@ export default function reducer(spotify = {}, action){
|
||||
}
|
||||
return Object.assign({}, spotify, {
|
||||
library_albums: [...spotify.library_albums, ...albums ],
|
||||
library_albums_more: action.data.next
|
||||
library_albums_spotify_more: action.data.next
|
||||
})
|
||||
|
||||
case 'SPOTIFY_LIBRARY_TRACKS_LOADED':
|
||||
|
||||
Reference in New Issue
Block a user