mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-22 08:53:41 +02:00
Add:User listening stats page and new library stats
This commit is contained in:
parent
7845e06a24
commit
b80d735750
13 changed files with 326 additions and 120 deletions
|
@ -375,11 +375,14 @@ class LibraryController {
|
|||
|
||||
var authorsWithCount = libraryHelpers.getAuthorsWithCount(audiobooksInLibrary)
|
||||
var genresWithCount = libraryHelpers.getGenresWithCount(audiobooksInLibrary)
|
||||
var abDurationStats = libraryHelpers.getAudiobookDurationStats(audiobooksInLibrary)
|
||||
var stats = {
|
||||
totalBooks: audiobooksInLibrary.length,
|
||||
totalAuthors: Object.keys(authorsWithCount).length,
|
||||
totalGenres: Object.keys(genresWithCount).length,
|
||||
totalDuration: libraryHelpers.getAudiobooksTotalDuration(audiobooksInLibrary),
|
||||
totalDuration: abDurationStats.totalDuration,
|
||||
longestAudiobooks: abDurationStats.longstAudiobooks,
|
||||
numAudioTracks: abDurationStats.numAudioTracks,
|
||||
totalSize: libraryHelpers.getAudiobooksTotalSize(audiobooksInLibrary),
|
||||
authorsWithCount,
|
||||
genresWithCount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue