Parse and update author name on each update

This commit is contained in:
Mark Cooper 2021-08-25 06:38:32 -05:00
parent 6ca7e9e6a6
commit 81487d1dba
9 changed files with 65 additions and 41 deletions

View file

@ -1,4 +1,3 @@
const Path = require('path')
const Logger = require('./Logger')
const BookFinder = require('./BookFinder')
const Audiobook = require('./Audiobook')
@ -120,11 +119,6 @@ class Scanner {
hasUpdates = true
}
if (audiobookData.author && existingAudiobook.syncAuthorNames(audiobookData)) {
Logger.info(`[Scanner] "${existingAudiobook.title}" author names updated, "${existingAudiobook.authorLF}"`)
hasUpdates = true
}
if (hasUpdates) {
Logger.info(`[Scanner] "${existingAudiobook.title}" was updated - saving`)
existingAudiobook.lastUpdate = Date.now()