mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-16 16:31:30 +00:00
Merge 3a751f711a into 47ea6b5092
This commit is contained in:
commit
d5c4c0f800
9 changed files with 221 additions and 106 deletions
|
|
@ -3,6 +3,8 @@ const cron = require('../libs/nodeCron')
|
|||
const Logger = require('../Logger')
|
||||
const Database = require('../Database')
|
||||
const LibraryScanner = require('../scanner/LibraryScanner')
|
||||
const Scanner = require('../scanner/Scanner')
|
||||
const { checkRemoveEmptySeries, checkRemoveAuthorsWithNoBooks } = require('../utils/cleanup')
|
||||
|
||||
const ShareManager = require('./ShareManager')
|
||||
|
||||
|
|
@ -74,7 +76,18 @@ class CronManager {
|
|||
Logger.error(`[CronManager] Library not found for scan cron ${_library.id}`)
|
||||
} else {
|
||||
Logger.debug(`[CronManager] Library scan cron executing for ${library.name}`)
|
||||
LibraryScanner.scan(library)
|
||||
await LibraryScanner.scan(library)
|
||||
|
||||
if (library.settings.matchAfterScan) {
|
||||
Logger.debug(`[CronManager] Library scan cron matching books for ${library.name}`)
|
||||
const apiRouterCtx = {
|
||||
checkRemoveEmptySeries,
|
||||
checkRemoveAuthorsWithNoBooks
|
||||
}
|
||||
Scanner.matchLibraryItems(apiRouterCtx, library, {
|
||||
minConfidence: library.settings.matchMinConfidence
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.libraryScanCrons.push({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue