From 2cb4f972d741d6284fd4438f590f854c647c2e90 Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 4 Aug 2022 18:22:35 -0500 Subject: [PATCH] Update:Collections page show total duration --- client/components/tables/CollectionBooksTable.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/components/tables/CollectionBooksTable.vue b/client/components/tables/CollectionBooksTable.vue index 63af8544..2fc7f0f0 100644 --- a/client/components/tables/CollectionBooksTable.vue +++ b/client/components/tables/CollectionBooksTable.vue @@ -7,7 +7,7 @@ {{ books.length }}
- +

{{ totalDurationPretty }}

@@ -57,6 +57,16 @@ export default { }, bookCoverAspectRatio() { return this.coverAspectRatio === this.$constants.BookCoverAspectRatio.SQUARE ? 1 : 1.6 + }, + totalDuration() { + var _total = 0 + this.books.forEach((book) => { + _total += book.media.duration + }) + return _total + }, + totalDurationPretty() { + return this.$elapsedPrettyExtended(this.totalDuration) } }, methods: {