mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-21 16:39:13 +02:00
New data model fix library stats
This commit is contained in:
parent
57399bb79e
commit
eea3e2583c
8 changed files with 69 additions and 33 deletions
|
@ -44,7 +44,7 @@ class LibraryController {
|
|||
if (req.query.include && req.query.include === 'filterdata') {
|
||||
return res.json({
|
||||
filterdata: libraryHelpers.getDistinctFilterDataNew(req.libraryItems),
|
||||
issues: libraryHelpers.getNumIssues(req.libraryItems),
|
||||
issues: req.libraryItems.filter(li => li.hasIssues).length,
|
||||
library: req.library
|
||||
})
|
||||
}
|
||||
|
@ -439,7 +439,6 @@ class LibraryController {
|
|||
|
||||
async stats(req, res) {
|
||||
var libraryItems = req.libraryItems
|
||||
|
||||
var authorsWithCount = libraryHelpers.getAuthorsWithCount(libraryItems)
|
||||
var genresWithCount = libraryHelpers.getGenresWithCount(libraryItems)
|
||||
var durationStats = libraryHelpers.getItemDurationStats(libraryItems)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue