mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-09 15:24:55 +02:00
Added totals of updated and unmatched books to toast shown at completion of batch quick match.
This commit is contained in:
@ -308,6 +308,7 @@ class LibraryItemController {
|
||||
// POST: api/items/batch/quickmatch
|
||||
async batchQuickMatch(req, res) {
|
||||
var itemsUpdated = 0
|
||||
var itemsUnmatched = 0
|
||||
|
||||
var matchData = req.body
|
||||
var options = matchData.options || {}
|
||||
@ -321,12 +322,15 @@ class LibraryItemController {
|
||||
var matchResult = await this.scanner.quickMatchLibraryItem(libraryItem, options)
|
||||
if (matchResult.updated) {
|
||||
itemsUpdated++
|
||||
}
|
||||
} else if (matchResult.warning) {
|
||||
itemsUnmatched++
|
||||
}
|
||||
}
|
||||
|
||||
res.json({
|
||||
success: itemsUpdated > 0,
|
||||
updates: itemsUpdated
|
||||
updates: itemsUpdated,
|
||||
unmatched: itemsUnmatched
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user