From f873642e4255addd26cb713386caad64f16099d9 Mon Sep 17 00:00:00 2001 From: mfcar Date: Thu, 12 Jan 2023 12:16:37 +0000 Subject: [PATCH] Add total duration info on the podcasts page. --- client/pages/item/_id/index.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index 9f54d5bc1..d4a7eceb4 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -113,6 +113,14 @@ {{ durationPretty }} +
+
+ {{ $strings.LabelDuration }} +
+
+ {{ (podcastDurationTotal / 3600).toFixed(1) }} (hrs) +
+
{{ $strings.LabelSize }} @@ -376,6 +384,13 @@ export default { podcastAuthor() { return this.mediaMetadata.author || '' }, + podcastDurationTotal() { + let totalDuration = 0; + this.media.episodes.forEach((ep) => { + totalDuration += ep.duration + }) + return totalDuration; + }, authors() { return this.mediaMetadata.authors || [] },