Loader progress style; Progress for enqueue

This commit is contained in:
James Barnsley
2017-09-08 07:57:48 +12:00
parent a397a9ffba
commit f24399c897
4 changed files with 34 additions and 12 deletions

View File

@ -337,7 +337,15 @@ const MopidyMiddleware = (function(){
next(action)
// start our processor
store.dispatch(uiActions.startProcess('MOPIDY_ENQUEUE_URIS_PROCESSOR', 'Adding '+action.uris.length+' URI(s)', {batches: batches}))
store.dispatch(uiActions.startProcess(
'MOPIDY_ENQUEUE_URIS_PROCESSOR',
'Adding '+action.uris.length+' URI(s)',
{
batches: batches,
remaining: action.uris.length,
total: action.uris.length
}
))
break
case 'MOPIDY_ENQUEUE_URIS_PROCESSOR':
@ -352,7 +360,13 @@ const MopidyMiddleware = (function(){
total_uris += batches[i].uris.length
}
batches.shift()
store.dispatch(uiActions.updateProcess('MOPIDY_ENQUEUE_URIS_PROCESSOR', 'Adding '+total_uris+' URI(s)'))
store.dispatch(uiActions.updateProcess(
'MOPIDY_ENQUEUE_URIS_PROCESSOR',
'Adding '+total_uris+' URI(s)',
{
remaining: total_uris
}
))
// no batches means we're done here
} else {