mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-26 11:11:43 +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 }}
|
{{ durationPretty }}
|
||||||
</div>
|
</div>
|
||||||
</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="flex py-0.5">
|
||||||
<div class="w-32">
|
<div class="w-32">
|
||||||
<span class="text-white text-opacity-60 uppercase text-sm">{{ $strings.LabelSize }}</span>
|
<span class="text-white text-opacity-60 uppercase text-sm">{{ $strings.LabelSize }}</span>
|
||||||
|
|
@ -376,6 +384,13 @@ export default {
|
||||||
podcastAuthor() {
|
podcastAuthor() {
|
||||||
return this.mediaMetadata.author || ''
|
return this.mediaMetadata.author || ''
|
||||||
},
|
},
|
||||||
|
podcastDurationTotal() {
|
||||||
|
let totalDuration = 0;
|
||||||
|
this.media.episodes.forEach((ep) => {
|
||||||
|
totalDuration += ep.duration
|
||||||
|
})
|
||||||
|
return totalDuration;
|
||||||
|
},
|
||||||
authors() {
|
authors() {
|
||||||
return this.mediaMetadata.authors || []
|
return this.mediaMetadata.authors || []
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue