This commit is contained in:
Tomasz 2025-11-20 19:08:04 -08:00 committed by GitHub
commit 43133f24b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,7 +259,7 @@ class Scanner {
SocketAuthority.emitter('author_added', author.toOldJSON()) SocketAuthority.emitter('author_added', author.toOldJSON())
// Update filter data // Update filter data
Database.addAuthorToFilterData(libraryItem.libraryId, author.name, author.id) Database.addAuthorToFilterData(libraryItem.libraryId, author.name, author.id)
}
await Database.bookAuthorModel await Database.bookAuthorModel
.create({ .create({
authorId: author.id, authorId: author.id,
@ -270,7 +270,6 @@ class Scanner {
libraryItem.media.authors.push(author) libraryItem.media.authors.push(author)
hasAuthorUpdates = true hasAuthorUpdates = true
}) })
}
} }
const authorsRemoved = libraryItem.media.authors.filter((a) => !matchData.author.find((ma) => ma.toLowerCase() === a.name.toLowerCase())) const authorsRemoved = libraryItem.media.authors.filter((a) => !matchData.author.find((ma) => ma.toLowerCase() === a.name.toLowerCase()))
if (authorsRemoved.length) { if (authorsRemoved.length) {