mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-15 00:09:38 +00:00
Clean and parse author name from directory, sort by author last name, scan for covers
This commit is contained in:
parent
9300a0bfb6
commit
e230cb47e8
28 changed files with 783 additions and 59 deletions
|
|
@ -1,6 +1,7 @@
|
|||
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']
|
||||
|
|
@ -74,6 +75,14 @@ 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue