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,11 +112,22 @@ export default {
|
||||
items: []
|
||||
})
|
||||
var newtreemap = currtreemap.items[currtreemap.items.length - 1]
|
||||
dirReader.readEntries((entries) => {
|
||||
let entriesPromises = []
|
||||
for (let entr of entries) entriesPromises.push(traverseFileTreePromise(entr, newtreemap))
|
||||
resolve(Promise.all(entriesPromises))
|
||||
})
|
||||
|
||||
let entriesPromises = []
|
||||
// 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))
|
||||
}
|
||||
})
|
||||
}
|
||||
readEntries()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user