mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-07 11:12:45 +02:00
@@ -26,7 +26,16 @@ class CollectionController {
|
||||
}
|
||||
|
||||
findOne(req, res) {
|
||||
res.json(req.collection.toJSONExpanded(this.db.libraryItems))
|
||||
const includeEntities = (req.query.include || '').split(',')
|
||||
|
||||
const collectionExpanded = req.collection.toJSONExpanded(this.db.libraryItems)
|
||||
|
||||
if (includeEntities.includes('rssfeed')) {
|
||||
const feedData = this.rssFeedManager.findFeedForEntityId(collectionExpanded.id)
|
||||
collectionExpanded.rssFeed = feedData ? feedData.toJSONMinified() : null
|
||||
}
|
||||
|
||||
res.json(collectionExpanded)
|
||||
}
|
||||
|
||||
async update(req, res) {
|
||||
|
||||
@@ -21,7 +21,7 @@ class LibraryItemController {
|
||||
}
|
||||
|
||||
if (includeEntities.includes('rssfeed')) {
|
||||
const feedData = this.rssFeedManager.findFeedForItem(item.id)
|
||||
const feedData = this.rssFeedManager.findFeedForEntityId(item.id)
|
||||
item.rssFeed = feedData ? feedData.toJSONMinified() : null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user