mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Fixing tabs again.
This commit is contained in:
parent
3e7a76574b
commit
dd8577354b
@ -311,9 +311,9 @@ class LibraryItemController {
|
|||||||
Logger.warn('User other than admin attempted to batch quick match library items', req.user)
|
Logger.warn('User other than admin attempted to batch quick match library items', req.user)
|
||||||
return res.sendStatus(403)
|
return res.sendStatus(403)
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemsUpdated = 0
|
var itemsUpdated = 0
|
||||||
var itemsUnmatched = 0
|
var itemsUnmatched = 0
|
||||||
|
|
||||||
var matchData = req.body
|
var matchData = req.body
|
||||||
var options = matchData.options || {}
|
var options = matchData.options || {}
|
||||||
@ -321,7 +321,7 @@ class LibraryItemController {
|
|||||||
if (!items || !items.length) {
|
if (!items || !items.length) {
|
||||||
return res.sendStatus(500)
|
return res.sendStatus(500)
|
||||||
}
|
}
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
|
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
var libraryItem = this.db.libraryItems.find(_li => _li.id === items[i])
|
var libraryItem = this.db.libraryItems.find(_li => _li.id === items[i])
|
||||||
@ -329,16 +329,16 @@ class LibraryItemController {
|
|||||||
if (matchResult.updated) {
|
if (matchResult.updated) {
|
||||||
itemsUpdated++
|
itemsUpdated++
|
||||||
} else if (matchResult.warning) {
|
} else if (matchResult.warning) {
|
||||||
itemsUnmatched++
|
itemsUnmatched++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = {
|
var result = {
|
||||||
success: itemsUpdated > 0,
|
success: itemsUpdated > 0,
|
||||||
updates: itemsUpdated,
|
updates: itemsUpdated,
|
||||||
unmatched: itemsUnmatched
|
unmatched: itemsUnmatched
|
||||||
};
|
};
|
||||||
this.clientEmitter(req.user.id, 'batch_quickmatch_complete', result)
|
this.clientEmitter(req.user.id, 'batch_quickmatch_complete', result)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/items/all
|
// DELETE: api/items/all
|
||||||
|
Loading…
Reference in New Issue
Block a user