mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-16 16:31: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
|
|
@ -354,6 +354,15 @@ class LibraryController {
|
|||
updatedSettings[key] = req.body.settings[key] === null ? null : Number(req.body.settings[key])
|
||||
Logger.debug(`[LibraryController] Library "${req.library.name}" updating setting "${key}" to "${updatedSettings[key]}"`)
|
||||
}
|
||||
} else if (key === 'matchAfterScan') {
|
||||
if (typeof req.body.settings[key] !== 'boolean') {
|
||||
return res.status(400).send('Invalid request. Setting "matchAfterScan" must be a boolean')
|
||||
}
|
||||
if (req.body.settings[key] !== updatedSettings[key]) {
|
||||
hasUpdates = true
|
||||
updatedSettings[key] = req.body.settings[key]
|
||||
Logger.debug(`[LibraryController] Library "${req.library.name}" updating setting "${key}" to "${updatedSettings[key]}"`)
|
||||
}
|
||||
} else {
|
||||
if (typeof req.body.settings[key] !== typeof updatedSettings[key]) {
|
||||
Logger.error(`[LibraryController] Invalid request. Setting "${key}" must be of type ${typeof updatedSettings[key]}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue