Progress indicator for processes - could be prettier, but functional for now
This commit is contained in:
@ -1186,7 +1186,15 @@ const MopidyMiddleware = (function(){
|
||||
});
|
||||
|
||||
// Start our process to load the full album objects
|
||||
store.dispatch(uiActions.startProcess('MOPIDY_LIBRARY_ALBUMS_PROCESSOR','Loading '+uris.length+' local albums', {uris: uris}))
|
||||
store.dispatch(uiActions.startProcess(
|
||||
'MOPIDY_LIBRARY_ALBUMS_PROCESSOR',
|
||||
'Loading '+uris.length+' local albums',
|
||||
{
|
||||
uris: uris,
|
||||
total: uris.length,
|
||||
remaining: uris.length
|
||||
}
|
||||
))
|
||||
})
|
||||
|
||||
} else if (last_run.status == 'cancelled'){
|
||||
@ -1211,7 +1219,14 @@ const MopidyMiddleware = (function(){
|
||||
var uris_to_load = uris.splice(0,50)
|
||||
|
||||
if (uris_to_load.length > 0){
|
||||
store.dispatch(uiActions.updateProcess('MOPIDY_LIBRARY_ALBUMS_PROCESSOR', 'Loading '+uris.length+' local albums', {uris: uris}))
|
||||
store.dispatch(uiActions.updateProcess(
|
||||
'MOPIDY_LIBRARY_ALBUMS_PROCESSOR',
|
||||
'Loading '+uris.length+' local albums',
|
||||
{
|
||||
uris: uris,
|
||||
remaining: uris.length
|
||||
}
|
||||
))
|
||||
store.dispatch(mopidyActions.getAlbums(uris_to_load, {name: 'MOPIDY_LIBRARY_ALBUMS_PROCESSOR', data: {uris: uris}}))
|
||||
} else {
|
||||
store.dispatch(uiActions.processFinished('MOPIDY_LIBRARY_ALBUMS_PROCESSOR'))
|
||||
|
||||
Reference in New Issue
Block a user