Fix:Revert calculating total entities

This commit is contained in:
advplyr 2022-11-13 16:46:43 -06:00
parent 1fe4cffd3b
commit 4d2bcfd167

View File

@ -190,15 +190,15 @@ class LibraryController {
libraryItems = collapsedItems
// Get accurate total entities
let uniqueEntities = new Set()
libraryItems.forEach((item) => {
if (item.collapsedSeries) {
item.collapsedSeries.books.forEach(book => uniqueEntities.add(book.id))
} else {
uniqueEntities.add(item.id)
}
})
payload.total = uniqueEntities.size
// let uniqueEntities = new Set()
// libraryItems.forEach((item) => {
// if (item.collapsedSeries) {
// item.collapsedSeries.books.forEach(book => uniqueEntities.add(book.id))
// } else {
// uniqueEntities.add(item.id)
// }
// })
payload.total = libraryItems.length
}
}