mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-18 10:59:41 +02:00
Update match all books to load items from DB, remove library items loading to memory on init
This commit is contained in:
@@ -118,12 +118,13 @@ class LibraryItem extends Model {
|
||||
* @param {number} limit
|
||||
* @returns {Promise<Model<LibraryItem>[]>} LibraryItem
|
||||
*/
|
||||
static getLibraryItemsIncrement(offset, limit) {
|
||||
static getLibraryItemsIncrement(offset, limit, where = null) {
|
||||
return this.findAll({
|
||||
benchmark: true,
|
||||
logging: (sql, timeMs) => {
|
||||
console.log(`[Query] Elapsed ${timeMs}ms.`)
|
||||
},
|
||||
where,
|
||||
include: [
|
||||
{
|
||||
model: this.sequelize.models.book,
|
||||
|
Reference in New Issue
Block a user