Add logging when author normalization is empty

This commit is contained in:
Nicholas Wallace 2026-05-13 14:16:30 -07:00
parent 6b97fc0ce6
commit c814a84b27
3 changed files with 12 additions and 2 deletions

View file

@ -223,6 +223,10 @@ class BookScanner {
for (const authorName of bookMetadata.authors) {
if (!media.authors.some((au) => Database.authorModel.isAuthorNameMatch(au.name, authorName))) {
const { author, created } = await Database.authorModel.findOrCreateByNameAndLibrary(authorName, libraryItemData.libraryId)
if (!author) {
libraryScan.addLog(LogLevel.WARN, `Skipping author "${authorName}" because normalized name was empty`)
continue
}
if (!created) {
await Database.bookAuthorModel.create({
bookId: media.id,