mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
feat: add series search by Audible ASIN
- Update libraryItemsBookFilters to search by audibleSeriesAsin - Searching for an ASIN in the library now finds books in that series
This commit is contained in:
parent
b8b3a20498
commit
edbd49c4c1
1 changed files with 11 additions and 2 deletions
|
|
@ -1179,12 +1179,21 @@ module.exports = {
|
|||
})
|
||||
}
|
||||
|
||||
// Search series
|
||||
// Search series by name or Audible ASIN
|
||||
const matchName = textSearchQuery.matchExpression('name')
|
||||
const allSeries = await Database.seriesModel.findAll({
|
||||
where: {
|
||||
[Sequelize.Op.and]: [
|
||||
Sequelize.literal(matchName),
|
||||
{
|
||||
[Sequelize.Op.or]: [
|
||||
Sequelize.literal(matchName),
|
||||
{
|
||||
audibleSeriesAsin: {
|
||||
[Sequelize.Op.substring]: query
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
libraryId: library.id
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue