mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-20 18:59:37 +00:00
Merge pull request #2677 from Teekeks/enhance-ebook-filter
feat: Expanded filter to include "has no ebook" and "has no supplementary ebooks" options
This commit is contained in:
commit
c93c863d82
22 changed files with 56 additions and 0 deletions
|
|
@ -204,6 +204,10 @@ module.exports = {
|
|||
mediaWhere['ebookFile'] = {
|
||||
[Sequelize.Op.not]: null
|
||||
}
|
||||
} else if (value == 'no-ebook') {
|
||||
mediaWhere['ebookFile'] = {
|
||||
[Sequelize.Op.eq]: null
|
||||
}
|
||||
}
|
||||
} else if (group === 'missing') {
|
||||
if (['asin', 'isbn', 'subtitle', 'publishedYear', 'description', 'publisher', 'language', 'cover'].includes(value)) {
|
||||
|
|
@ -421,6 +425,10 @@ module.exports = {
|
|||
libraryItemWhere['libraryFiles'] = {
|
||||
[Sequelize.Op.substring]: `"isSupplementary":true`
|
||||
}
|
||||
} else if (filterGroup === 'ebooks' && filterValue === 'no-supplementary') {
|
||||
libraryItemWhere['libraryFiles'] = {
|
||||
[Sequelize.Op.notLike]: Sequelize.literal(`\'%"isSupplementary":true%\'`),
|
||||
}
|
||||
} else if (filterGroup === 'missing' && filterValue === 'authors') {
|
||||
authorInclude = {
|
||||
model: Database.authorModel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue