Remaining counters
This commit is contained in:
@ -1324,7 +1324,10 @@ export function getLibraryPlaylistsProcessor(data){
|
||||
|
||||
// We got a next link, so we've got more work to be done
|
||||
if (response.next){
|
||||
dispatch(uiActions.updateProcess('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR', 'Loading '+response.total+' Spotify playlists'))
|
||||
var total = response.total
|
||||
var loaded = getState().spotify.library_playlists.length
|
||||
var remaining = total - loaded
|
||||
dispatch(uiActions.updateProcess('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR', 'Loading '+remaining+' Spotify playlists'))
|
||||
dispatch(uiActions.runProcess('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR', {next: response.next}))
|
||||
} else {
|
||||
dispatch(uiActions.processFinished('SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR'))
|
||||
@ -1366,7 +1369,10 @@ export function getLibraryArtistsProcessor(data){
|
||||
|
||||
// We got a next link, so we've got more work to be done
|
||||
if (response.artists.next){
|
||||
dispatch(uiActions.updateProcess('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR', 'Loading '+response.artists.total+' Spotify artists'))
|
||||
var total = response.artists.total
|
||||
var loaded = getState().spotify.library_artists.length
|
||||
var remaining = total - loaded
|
||||
dispatch(uiActions.updateProcess('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR', 'Loading '+remaining+' Spotify artists'))
|
||||
dispatch(uiActions.runProcess('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR', {next: response.artists.next}))
|
||||
} else {
|
||||
dispatch(uiActions.processFinished('SPOTIFY_GET_LIBRARY_ARTISTS_PROCESSOR'))
|
||||
@ -1408,7 +1414,10 @@ export function getLibraryAlbumsProcessor(data){
|
||||
|
||||
// We got a next link, so we've got more work to be done
|
||||
if (response.next){
|
||||
dispatch(uiActions.updateProcess('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR', 'Loading '+response.total+' Spotify albums'))
|
||||
var total = response.total
|
||||
var loaded = getState().spotify.library_albums.length
|
||||
var remaining = total - loaded
|
||||
dispatch(uiActions.updateProcess('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR', 'Loading '+remaining+' Spotify albums'))
|
||||
dispatch(uiActions.runProcess('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR', {next: response.next}))
|
||||
} else {
|
||||
dispatch(uiActions.processFinished('SPOTIFY_GET_LIBRARY_ALBUMS_PROCESSOR'))
|
||||
|
||||
Reference in New Issue
Block a user