mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Fix:Drag and drop upload limits to 100 items per folder #560
This commit is contained in:
parent
d869a9836e
commit
db48a486e5
@ -112,12 +112,23 @@ export default {
|
|||||||
items: []
|
items: []
|
||||||
})
|
})
|
||||||
var newtreemap = currtreemap.items[currtreemap.items.length - 1]
|
var newtreemap = currtreemap.items[currtreemap.items.length - 1]
|
||||||
dirReader.readEntries((entries) => {
|
|
||||||
let entriesPromises = []
|
let entriesPromises = []
|
||||||
for (let entr of entries) entriesPromises.push(traverseFileTreePromise(entr, newtreemap))
|
// readEntries returns 100 items max, continue calling readEntries until empty
|
||||||
|
function readEntries() {
|
||||||
|
dirReader.readEntries((entries) => {
|
||||||
|
if (entries.length > 0) {
|
||||||
|
for (let entr of entries) {
|
||||||
|
entriesPromises.push(traverseFileTreePromise(entr, newtreemap))
|
||||||
|
}
|
||||||
|
readEntries()
|
||||||
|
} else {
|
||||||
resolve(Promise.all(entriesPromises))
|
resolve(Promise.all(entriesPromises))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
readEntries()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user