Skip to content

Commit

Permalink
Add libraryItemIds to collapsedSeries objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher committed May 7, 2024
1 parent a668921 commit c674042
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/utils/queries/libraryItemsBookFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ module.exports = {
booksToInclude.push(book.id)
bookSeriesToInclude.push({
id: book.bookSeries.id,
numBooks: s.dataValues.numBooks
numBooks: s.dataValues.numBooks,
libraryItemIds: s.books?.map((b) => b.libraryItem.id) || []
})
booksToExclude = booksToExclude.filter((bid) => bid !== book.id)
found = true
Expand Down Expand Up @@ -594,7 +595,8 @@ module.exports = {
name: collapsedSeries.series.name,
nameIgnorePrefix: collapsedSeries.series.nameIgnorePrefix,
sequence: collapsedSeries.sequence,
numBooks: collapseSeriesObj?.numBooks || 0
numBooks: collapseSeriesObj?.numBooks || 0,
libraryItemIds: collapseSeriesObj?.libraryItemIds || []
}
}
}
Expand Down

0 comments on commit c674042

Please sign in to comment.