mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-27 19:02:44 +01:00
Fix scan for audiobook directories in root dir
This commit is contained in:
1 parent
f4cb5d101e
commit
73a786879e
11 files changed
+157
-11
No files matched your search
@@ -39,13 +39,15 @@ async function getAllAudiobookFiles(abRootPath) {
|
||||
var pathformat = Path.parse(relpath)
|
||||
var path = pathformat.dir
|
||||
|
||||
// If relative file directory has 3 folders, then the middle folder will be series
|
||||
var splitDir = pathformat.dir.split(Path.sep)
|
||||
if (splitDir.length === 1) {
|
||||
Logger.error('Invalid file in root dir', filepath)
|
||||
if (!path) {
|
||||
Logger.error('Ignoring file in root dir', filepath)
|
||||
return
|
||||
}
|
||||
var author = splitDir.shift()
|
||||
|
||||
// If relative file directory has 3 folders, then the middle folder will be series
|
||||
var splitDir = pathformat.dir.split(Path.sep)
|
||||
var author = null
|
||||
if (splitDir.length > 1) author = splitDir.shift()
|
||||
var series = null
|
||||
if (splitDir.length > 1) series = splitDir.shift()
|
||||
var title = splitDir.shift()
|
||||
|
||||
Reference in new issue
Block a user