mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-22 03:39:37 +00:00
Merge 90f4c48f0b into 626596b192
This commit is contained in:
commit
ed99fb0525
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ module.exports = {
|
||||||
seriesWhere.push(Sequelize.where(Sequelize.literal(`(${progQuery})`), 0))
|
seriesWhere.push(Sequelize.where(Sequelize.literal(`(${progQuery})`), 0))
|
||||||
userPermissionBookWhere.replacements.userId = user.id
|
userPermissionBookWhere.replacements.userId = user.id
|
||||||
} else if (filterValue === 'in-progress') {
|
} else if (filterValue === 'in-progress') {
|
||||||
attrQuery = 'SELECT count(*) FROM books b, bookSeries bs LEFT OUTER JOIN mediaProgresses mp ON mp.mediaItemId = b.id AND mp.userId = :userId WHERE bs.seriesId = series.id AND bs.bookId = b.id AND (mp.currentTime > 0 OR mp.ebookProgress > 0) AND mp.isFinished = 0'
|
attrQuery = 'SELECT count(*) FROM books b JOIN bookSeries bs ON bs.bookId = b.id LEFT JOIN mediaProgresses mp ON mp.mediaItemId = b.id AND mp.userId = :userId WHERE bs.seriesId = series.id GROUP BY bs.seriesId HAVING SUM(mp.isFinished = 1) < COUNT(*) AND SUM(mp.currentTime > 0 OR mp.ebookProgress > 0 OR mp.isFinished = 1) > 0'
|
||||||
userPermissionBookWhere.replacements.userId = user.id
|
userPermissionBookWhere.replacements.userId = user.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue