mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-03 09:44:41 +02:00
Update podcast controller to load library items from db
This commit is contained in:
parent
f465193b9c
commit
6056c14926
6 changed files with 95 additions and 80 deletions
|
@ -1,4 +1,4 @@
|
|||
const { DataTypes, Model } = require('sequelize')
|
||||
const { DataTypes, Model, WhereOptions } = require('sequelize')
|
||||
const Logger = require('../Logger')
|
||||
const oldLibraryItem = require('../objects/LibraryItem')
|
||||
const libraryFilters = require('../utils/queries/libraryFilters')
|
||||
|
@ -102,11 +102,12 @@ module.exports = (sequelize) => {
|
|||
|
||||
/**
|
||||
* Currently unused because this is too slow and uses too much mem
|
||||
*
|
||||
* @param {[WhereOptions]} where
|
||||
* @returns {Array<objects.LibraryItem>} old library items
|
||||
*/
|
||||
static async getAllOldLibraryItems() {
|
||||
static async getAllOldLibraryItems(where = null) {
|
||||
let libraryItems = await this.findAll({
|
||||
where,
|
||||
include: [
|
||||
{
|
||||
model: sequelize.models.book,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue