mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-16 22:31:47 +00:00
Add total duration info on the podcasts page.
This commit is contained in:
parent
39d8c2cf04
commit
f873642e42
1 changed files with 15 additions and 0 deletions
|
|
@ -113,6 +113,14 @@
|
|||
{{ durationPretty }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isPodcast" class="flex py-0.5">
|
||||
<div class="w-32">
|
||||
<span class="text-white text-opacity-60 uppercase text-sm">{{ $strings.LabelDuration }}</span>
|
||||
</div>
|
||||
<div>
|
||||
{{ (podcastDurationTotal / 3600).toFixed(1) }} (hrs)
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex py-0.5">
|
||||
<div class="w-32">
|
||||
<span class="text-white text-opacity-60 uppercase text-sm">{{ $strings.LabelSize }}</span>
|
||||
|
|
@ -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 || []
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue