Add library match all back updated to support v2 models

This commit is contained in:
advplyr 2022-04-20 18:05:09 -05:00
parent ff294867f8
commit 35f3b5863f
6 changed files with 60 additions and 45 deletions

View file

@ -546,12 +546,12 @@ class LibraryController {
res.json(Object.values(authors))
}
async matchBooks(req, res) {
async matchAll(req, res) {
if (!req.user.isRoot) {
Logger.error(`[LibraryController] Non-root user attempted to match library books`, req.user)
Logger.error(`[LibraryController] Non-root user attempted to match library items`, req.user)
return res.sendStatus(403)
}
this.scanner.matchLibraryBooks(req.library)
this.scanner.matchLibraryItems(req.library)
res.sendStatus(200)
}

View file

@ -247,7 +247,7 @@ class LibraryItemController {
var libraryItem = req.libraryItem
var options = req.body || {}
var matchResult = await this.scanner.quickMatchBook(libraryItem, options)
var matchResult = await this.scanner.quickMatchLibraryItem(libraryItem, options)
res.json(matchResult)
}