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

@ -250,7 +250,10 @@ class Scanner {
const existingAuthor = libraryItem.media.authors.find((a) => Database.authorModel.isAuthorNameMatch(a.name, authorName))
if (!existingAuthor) {
const { author, created: isCreated } = await Database.authorModel.findOrCreateByNameAndLibrary(authorName, libraryItem.libraryId)
if (!author) continue
if (!author) {
libraryScan.addLog(LogLevel.WARN, `Skipping author "${authorName}" because normalized name was empty`)
continue
}
if (isCreated) {
SocketAuthority.emitter('author_added', author.toOldJSON())
// Update filter data