mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-07 16:44:16 +01:00
Update:Cache feed xml
This commit is contained in:
parent
fbbceaa642
commit
46fc89e247
@ -20,6 +20,9 @@ class Feed {
|
||||
this.createdAt = null
|
||||
this.updatedAt = null
|
||||
|
||||
// Cached xml
|
||||
this.xml = null
|
||||
|
||||
if (feed) {
|
||||
this.construct(feed)
|
||||
}
|
||||
@ -108,11 +111,14 @@ class Feed {
|
||||
}
|
||||
|
||||
buildXml() {
|
||||
if (this.xml) return this.xml
|
||||
|
||||
const pod = new Podcast(this.meta.getPodcastMeta())
|
||||
this.episodes.forEach((ep) => {
|
||||
pod.addItem(ep.getPodcastEpisode())
|
||||
})
|
||||
return pod.buildXml()
|
||||
this.xml = pod.buildXml()
|
||||
return this.xml
|
||||
}
|
||||
}
|
||||
module.exports = Feed
|
Loading…
Reference in New Issue
Block a user