Update:Remove RSS feeds from login response payload and include feeds from library items request

This commit is contained in:
advplyr
2022-12-31 10:59:12 -06:00
parent 8bbfee334c
commit 0e6b0d3eff
9 changed files with 36 additions and 55 deletions

View File

@ -291,11 +291,11 @@ module.exports = {
collapseBookSeries(libraryItems, series, filterSeries) {
// Get series from the library items. If this list is being collapsed after filtering for a series,
// don't collapse that series, only books that are in other series.
var seriesObjects = this
const seriesObjects = this
.getSeriesFromBooks(libraryItems, series, filterSeries, null, null, true)
.filter(s => s.id != filterSeries)
var filteredLibraryItems = []
const filteredLibraryItems = []
libraryItems.forEach((li) => {
if (li.mediaType != 'book') return
@ -307,12 +307,12 @@ module.exports = {
filteredLibraryItems.push(Object.assign(
Object.create(Object.getPrototypeOf(li)),
li, { collapsedSeries: series }))
});
})
// Only included books not contained in series
if (!seriesObjects.some(s => s.books.some(b => b.id == li.id)))
filteredLibraryItems.push(li)
});
})
return filteredLibraryItems
},