mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-25 13:24:57 +02:00
Updates to new library scanner and adding jsdoc types
This commit is contained in:
parent
ea1d051cfb
commit
2c8448d147
10 changed files with 416 additions and 16 deletions
|
@ -3,6 +3,8 @@ const Logger = require('../Logger')
|
|||
const oldLibraryItem = require('../objects/LibraryItem')
|
||||
const libraryFilters = require('../utils/queries/libraryFilters')
|
||||
const { areEquivalent } = require('../utils/index')
|
||||
const Book = require('./Book')
|
||||
const Podcast = require('./Podcast')
|
||||
|
||||
/**
|
||||
* @typedef LibraryFileObject
|
||||
|
@ -791,6 +793,11 @@ class LibraryItem extends Model {
|
|||
return this.getOldLibraryItem(libraryItem)
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import('sequelize').FindOptions} options
|
||||
* @returns {Promise<Book|Podcast>}
|
||||
*/
|
||||
getMedia(options) {
|
||||
if (!this.mediaType) return Promise.resolve(null)
|
||||
const mixinMethodName = `get${this.sequelize.uppercaseFirst(this.mediaType)}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue