mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-08 02:11:35 +00:00
Add logging when author normalization is empty
This commit is contained in:
parent
6b97fc0ce6
commit
c814a84b27
3 changed files with 12 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue