mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-21 08:01:34 +01:00
Fix batch add collection endpoint to ignore duplicates, matching fix for #5716
This commit is contained in:
1 parent
a5540d07c6
commit
5de038dafd
2 files changed
+41
-2
No files matched your search
@@ -363,7 +363,7 @@ class CollectionController {
|
||||
|
||||
let jsonExpanded = null
|
||||
if (hasUpdated) {
|
||||
await Database.collectionBookModel.bulkCreate(collectionBooksToAdd)
|
||||
await Database.collectionBookModel.bulkCreate(collectionBooksToAdd, { ignoreDuplicates: true })
|
||||
|
||||
jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||
if (jsonExpanded) SocketAuthority.clientEmitter(req.user.id, 'collection_updated', jsonExpanded)
|
||||
|
||||
Reference in new issue
Block a user