mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-13 02:19:46 +01:00
Add size stats
This commit is contained in:
@@ -637,6 +637,7 @@ class LibraryController {
|
||||
var authorsWithCount = libraryHelpers.getAuthorsWithCount(libraryItems)
|
||||
var genresWithCount = libraryHelpers.getGenresWithCount(libraryItems)
|
||||
var durationStats = libraryHelpers.getItemDurationStats(libraryItems)
|
||||
var sizeStats = libraryHelpers.getItemSizeStats(libraryItems)
|
||||
var stats = {
|
||||
totalItems: libraryItems.length,
|
||||
totalAuthors: Object.keys(authorsWithCount).length,
|
||||
@@ -645,6 +646,7 @@ class LibraryController {
|
||||
longestItems: durationStats.longestItems,
|
||||
numAudioTracks: durationStats.numAudioTracks,
|
||||
totalSize: libraryHelpers.getLibraryItemsTotalSize(libraryItems),
|
||||
largestItems: sizeStats.largestItems,
|
||||
authorsWithCount,
|
||||
genresWithCount
|
||||
}
|
||||
@@ -755,4 +757,4 @@ class LibraryController {
|
||||
next()
|
||||
}
|
||||
}
|
||||
module.exports = new LibraryController()
|
||||
module.exports = new LibraryController()
|
||||
|
||||
Reference in New Issue
Block a user