Update search endpoints to search db directly

This commit is contained in:
advplyr 2023-08-19 13:59:22 -05:00
parent b334d40998
commit c77cead9ae
8 changed files with 343 additions and 77 deletions

View file

@ -44,6 +44,21 @@ class Database {
return this.models.series
}
/** @type {typeof import('./models/Book')} */
get bookModel() {
return this.models.book
}
/** @type {typeof import('./models/Podcast')} */
get podcastModel() {
return this.models.podcast
}
/** @type {typeof import('./models/LibraryItem')} */
get libraryItemModel() {
return this.models.libraryItem
}
async checkHasDb() {
if (!await fs.pathExists(this.dbPath)) {
Logger.info(`[Database] absdatabase.sqlite not found at ${this.dbPath}`)