More work on queue restoring

This commit is contained in:
RemixDev 2021-05-21 12:31:14 +02:00
parent 3ee56d020b
commit 122d103959
2 changed files with 1372 additions and 1365 deletions

File diff suppressed because one or more lines are too long

View File

@ -219,7 +219,7 @@ export default {
} = data
console.log({ initQueueList })
const initQueueComplete = Object.values(initQueueList).filter(el => el.status === 'completed').map(el => el.uuid)
const initQueueComplete = Object.values(initQueueList).filter(el => ['completed', 'withErrors', 'failed'].includes(el.status)).map(el => el.uuid)
console.log({initQueueComplete})
@ -231,8 +231,8 @@ export default {
}
if (currentItem) {
initQueueList[currentItem].silent = true
this.addToQueue(initQueueList[currentItem], true)
currentItem.silent = true
this.addToQueue(currentItem, true)
}
initQueue.forEach(item => {
@ -259,6 +259,13 @@ export default {
}
}
// Add implicit values back
queueItem.downloaded = queueItem.downloaded || 0
queueItem.failed = queueItem.failed || 0
queueItem.progress = queueItem.progress || 0
queueItem.conversion = queueItem.conversion || 0
queueItem.errors = queueItem.errors || []
// * Here we have only queueItem objects
this.$set(queueItem, 'current', current)
this.$set(this.queueList, queueItem.uuid, queueItem)