Fixed undefined getSlimmedDict error

This commit is contained in:
RemixDev 2022-03-05 14:01:36 +01:00
parent 0a880bc245
commit 83b5675df3
2 changed files with 3 additions and 5 deletions

View File

@ -194,11 +194,10 @@ export class DeemixApp {
const slimmedObjects: any[] = [] const slimmedObjects: any[] = []
downloadObjs.forEach((downloadObj: any, pos: number) => { downloadObjs.forEach((downloadObj: any) => {
// Check if element is already in queue // Check if element is already in queue
if (Object.keys(this.queue).includes(downloadObj.uuid)) { if (Object.keys(this.queue).includes(downloadObj.uuid)) {
this.listener.send('alreadyInQueue', downloadObj.getEssentialDict()) this.listener.send('alreadyInQueue', downloadObj.getEssentialDict())
delete downloadObjs[pos]
return return
} }
@ -216,8 +215,7 @@ export class DeemixApp {
slimmedObjects.push(downloadObj.getSlimmedDict()) slimmedObjects.push(downloadObj.getSlimmedDict())
}) })
const isSingleObject = downloadObjs.length === 1 if (slimmedObjects.length === 1) this.listener.send('addedToQueue', slimmedObjects[0])
if (isSingleObject) this.listener.send('addedToQueue', downloadObjs[0].getSlimmedDict())
else this.listener.send('addedToQueue', slimmedObjects) else this.listener.send('addedToQueue', slimmedObjects)
this.startQueue(dz) this.startQueue(dz)

2
webui

@ -1 +1 @@
Subproject commit 5553ad4ebf8acb6b7db5996b382ade711ef1e51e Subproject commit 4cb90068e76fe2dfda3e776d1e240bfd48709a42