mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-28 00:39:40 +01:00
Fix:Open RSS feed for series & collections respect prevent indexing option #2047
This commit is contained in:
parent
61f2fb28e0
commit
88c794e710
@ -174,7 +174,7 @@ class Feed {
|
|||||||
this.xml = null
|
this.xml = null
|
||||||
}
|
}
|
||||||
|
|
||||||
setFromCollection(userId, slug, collectionExpanded, serverAddress) {
|
setFromCollection(userId, slug, collectionExpanded, serverAddress, preventIndexing = true, ownerName = null, ownerEmail = null) {
|
||||||
const feedUrl = `${serverAddress}/feed/${slug}`
|
const feedUrl = `${serverAddress}/feed/${slug}`
|
||||||
|
|
||||||
const itemsWithTracks = collectionExpanded.books.filter(libraryItem => libraryItem.media.tracks.length)
|
const itemsWithTracks = collectionExpanded.books.filter(libraryItem => libraryItem.media.tracks.length)
|
||||||
@ -198,6 +198,9 @@ class Feed {
|
|||||||
this.meta.feedUrl = feedUrl
|
this.meta.feedUrl = feedUrl
|
||||||
this.meta.link = `${serverAddress}/collection/${collectionExpanded.id}`
|
this.meta.link = `${serverAddress}/collection/${collectionExpanded.id}`
|
||||||
this.meta.explicit = !!itemsWithTracks.some(li => li.media.metadata.explicit) // explicit if any item is explicit
|
this.meta.explicit = !!itemsWithTracks.some(li => li.media.metadata.explicit) // explicit if any item is explicit
|
||||||
|
this.meta.preventIndexing = preventIndexing
|
||||||
|
this.meta.ownerName = ownerName
|
||||||
|
this.meta.ownerEmail = ownerEmail
|
||||||
|
|
||||||
this.episodes = []
|
this.episodes = []
|
||||||
|
|
||||||
@ -244,7 +247,7 @@ class Feed {
|
|||||||
this.xml = null
|
this.xml = null
|
||||||
}
|
}
|
||||||
|
|
||||||
setFromSeries(userId, slug, seriesExpanded, serverAddress) {
|
setFromSeries(userId, slug, seriesExpanded, serverAddress, preventIndexing = true, ownerName = null, ownerEmail = null) {
|
||||||
const feedUrl = `${serverAddress}/feed/${slug}`
|
const feedUrl = `${serverAddress}/feed/${slug}`
|
||||||
|
|
||||||
let itemsWithTracks = seriesExpanded.books.filter(libraryItem => libraryItem.media.tracks.length)
|
let itemsWithTracks = seriesExpanded.books.filter(libraryItem => libraryItem.media.tracks.length)
|
||||||
@ -272,6 +275,9 @@ class Feed {
|
|||||||
this.meta.feedUrl = feedUrl
|
this.meta.feedUrl = feedUrl
|
||||||
this.meta.link = `${serverAddress}/library/${libraryId}/series/${seriesExpanded.id}`
|
this.meta.link = `${serverAddress}/library/${libraryId}/series/${seriesExpanded.id}`
|
||||||
this.meta.explicit = !!itemsWithTracks.some(li => li.media.metadata.explicit) // explicit if any item is explicit
|
this.meta.explicit = !!itemsWithTracks.some(li => li.media.metadata.explicit) // explicit if any item is explicit
|
||||||
|
this.meta.preventIndexing = preventIndexing
|
||||||
|
this.meta.ownerName = ownerName
|
||||||
|
this.meta.ownerEmail = ownerEmail
|
||||||
|
|
||||||
this.episodes = []
|
this.episodes = []
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user