From be1e1e7ba070514256377dc43c95fcf733d5bc34 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 13 Mar 2022 17:33:50 -0500 Subject: [PATCH] New data model update stats page and routes, update users page --- client/components/stats/PreviewIcons.vue | 14 ++++----- client/pages/config/library-stats.vue | 26 ++++++++-------- client/pages/config/stats.vue | 14 ++++----- client/pages/config/users/_id.vue | 6 ++-- server/ApiController.js | 8 ++--- server/controllers/LibraryController.js | 18 +++++------ server/utils/libraryHelpers.js | 38 ++++++++++++------------ 7 files changed, 62 insertions(+), 62 deletions(-) diff --git a/client/components/stats/PreviewIcons.vue b/client/components/stats/PreviewIcons.vue index 918c1294..d96f0593 100644 --- a/client/components/stats/PreviewIcons.vue +++ b/client/components/stats/PreviewIcons.vue @@ -5,7 +5,7 @@
-

{{ totalBooks }}

+

{{ totalItems }}

Books in Library

@@ -13,7 +13,7 @@
show_chart
-

{{ totalAudiobookHours }}

+

{{ totalHours }}

Overall Hours

@@ -61,8 +61,8 @@ export default { user() { return this.$store.state.user.user }, - totalBooks() { - return this.libraryStats ? this.libraryStats.totalBooks : 0 + totalItems() { + return this.libraryStats ? this.libraryStats.totalItems : 0 }, totalAuthors() { return this.libraryStats ? this.libraryStats.totalAuthors : 0 @@ -70,11 +70,11 @@ export default { numAudioTracks() { return this.libraryStats ? this.libraryStats.numAudioTracks : 0 }, - totalAudiobookDuration() { + totalDuration() { return this.libraryStats ? this.libraryStats.totalDuration : 0 }, - totalAudiobookHours() { - var totalHours = Math.round(this.totalAudiobookDuration / (60 * 60)) + totalHours() { + var totalHours = Math.round(this.totalDuration / (60 * 60)) return totalHours }, totalSizePretty() { diff --git a/client/pages/config/library-stats.vue b/client/pages/config/library-stats.vue index 3f809c67..381c4987 100644 --- a/client/pages/config/library-stats.vue +++ b/client/pages/config/library-stats.vue @@ -11,12 +11,12 @@ @@ -39,14 +39,14 @@
-

Longest Audiobooks (hrs)

-

No Audiobooks

-