Add:User listening stats page and new library stats

This commit is contained in:
advplyr 2021-12-29 15:53:19 -06:00
parent 7845e06a24
commit b80d735750
13 changed files with 326 additions and 120 deletions

View file

@ -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