Skip to content

Commit

Permalink
Remove xml cache from Feed object
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher committed Dec 8, 2024
1 parent a8ab8ba commit b38ce41
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions server/objects/Feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class Feed {
this.createdAt = null
this.updatedAt = null

// Cached xml
this.xml = null

if (feed) {
this.construct(feed)
}
Expand Down Expand Up @@ -202,7 +199,6 @@ class Feed {
}

this.updatedAt = Date.now()
this.xml = null
}

setFromCollection(userId, slug, collectionExpanded, serverAddress, preventIndexing = true, ownerName = null, ownerEmail = null) {
Expand Down Expand Up @@ -297,7 +293,6 @@ class Feed {
})

this.updatedAt = Date.now()
this.xml = null
}

setFromSeries(userId, slug, seriesExpanded, serverAddress, preventIndexing = true, ownerName = null, ownerEmail = null) {
Expand Down Expand Up @@ -399,18 +394,14 @@ class Feed {
})

this.updatedAt = Date.now()
this.xml = null
}

buildXml(originalHostPrefix) {
if (this.xml) return this.xml

var rssfeed = new RSS(this.meta.getRSSData(originalHostPrefix))
this.episodes.forEach((ep) => {
rssfeed.item(ep.getRSSData(originalHostPrefix))
})
this.xml = rssfeed.xml()
return this.xml
return rssfeed.xml()
}

getAuthorsStringFromLibraryItems(libraryItems) {
Expand Down

0 comments on commit b38ce41

Please sign in to comment.