mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-10 01:15:06 +02:00
Fix podcast episode playback session duration, use podcast episode plaintext description
This commit is contained in:
parent
5d305c96ad
commit
d69f6020c6
5 changed files with 30 additions and 7 deletions
|
@ -1,3 +1,4 @@
|
|||
const { stripHtml } = require('string-strip-html')
|
||||
const { getId } = require('../../utils/index')
|
||||
const AudioFile = require('../files/AudioFile')
|
||||
const AudioTrack = require('../files/AudioTrack')
|
||||
|
@ -73,7 +74,8 @@ class PodcastEpisode {
|
|||
episodeType: this.episodeType,
|
||||
title: this.title,
|
||||
subtitle: this.subtitle,
|
||||
description: this.description,
|
||||
// description: this.description,
|
||||
description: this.descriptionPlain, // Temporary stripping HTML until proper cleaning is implemented
|
||||
enclosure: this.enclosure ? { ...this.enclosure } : null,
|
||||
pubDate: this.pubDate,
|
||||
audioFile: this.audioFile.toJSON(),
|
||||
|
@ -102,6 +104,10 @@ class PodcastEpisode {
|
|||
if (this.episode) return `${this.episode} - ${this.title}`
|
||||
return this.title
|
||||
}
|
||||
get descriptionPlain() {
|
||||
if (!this.description) return ''
|
||||
return stripHtml(this.description).result
|
||||
}
|
||||
|
||||
setData(data, index = 1) {
|
||||
this.id = getId('ep')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue