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,7 +1,6 @@
const Path = require('path')
const dir = require('node-dir')
const Logger = require('../Logger')
const parseAuthors = require('./parseAuthors')
const { cleanString } = require('./index')
const AUDIOBOOK_PARTS_FORMATS = ['m4b', 'mp3']
@ -75,14 +74,6 @@ async function getAllAudiobookFiles(abRootPath) {
parts: [],
otherFiles: []
}
if (author) {
var parsedAuthors = parseAuthors(author)
if (parsedAuthors) {
var { authorLF, authorFL } = parsedAuthors
audiobooks[path].authorLF = authorLF || null
audiobooks[path].authorFL = authorFL || null
}
}
}
var filetype = getFileType(pathformat.ext)