mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-02 21:44:56 +02:00
Update:Only load feeds when needed
This commit is contained in:
parent
20c11e381e
commit
6814adffcc
10 changed files with 125 additions and 55 deletions
|
@ -13,7 +13,7 @@ class LibraryItemController {
|
|||
constructor() { }
|
||||
|
||||
// Example expand with authors: api/items/:id?expanded=1&include=authors
|
||||
findOne(req, res) {
|
||||
async findOne(req, res) {
|
||||
const includeEntities = (req.query.include || '').split(',')
|
||||
if (req.query.expanded == 1) {
|
||||
var item = req.libraryItem.toJSONExpanded()
|
||||
|
@ -25,8 +25,8 @@ class LibraryItemController {
|
|||
}
|
||||
|
||||
if (includeEntities.includes('rssfeed')) {
|
||||
const feedData = this.rssFeedManager.findFeedForEntityId(item.id)
|
||||
item.rssFeed = feedData ? feedData.toJSONMinified() : null
|
||||
const feedData = await this.rssFeedManager.findFeedForEntityId(item.id)
|
||||
item.rssFeed = feedData?.toJSONMinified() || null
|
||||
}
|
||||
|
||||
if (item.mediaType == 'book') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue