mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-17 17:01:30 +00:00
Adds a 'Match after scan' option to the manual schedule configuration options for scanning.
This commit is contained in:
parent
0c7b738b7c
commit
0ab72d879e
8 changed files with 169 additions and 101 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,16 @@ 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)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.libraryScanCrons.push({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue