From 4d2bcfd167b3710f2a6d5ce9bce9ccf18c7a9cfd Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 13 Nov 2022 16:46:43 -0600 Subject: [PATCH] Fix:Revert calculating total entities --- server/controllers/LibraryController.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/controllers/LibraryController.js b/server/controllers/LibraryController.js index cd055e5c..dfda7538 100644 --- a/server/controllers/LibraryController.js +++ b/server/controllers/LibraryController.js @@ -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 } }