mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-08 00:54:33 +01:00
Fix:Revert calculating total entities
This commit is contained in:
parent
1fe4cffd3b
commit
4d2bcfd167
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user