mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-14 15:59:38 +00:00
Add:Support for book folders with CD# subfolders #393
This commit is contained in:
parent
c6eb1096e8
commit
2b7f53b0a7
2 changed files with 16 additions and 2 deletions
|
|
@ -47,6 +47,9 @@ function groupFilesIntoAudiobookPaths(paths) {
|
|||
} else if (!dirparts.length) { // This is the last directory, create group
|
||||
audiobookGroup[_path] = [Path.basename(path)]
|
||||
return
|
||||
} else if (dirparts.length === 1 && /^cd\d{1,3}$/i.test(dirparts[0])) { // Next directory is the last and is a CD dir, create group
|
||||
audiobookGroup[_path] = [Path.posix.join(dirparts[0], Path.basename(path))]
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -88,6 +91,9 @@ function groupFileItemsIntoBooks(fileItems) {
|
|||
} else if (!dirparts.length) { // This is the last directory, create group
|
||||
audiobookGroup[_path] = [item.name]
|
||||
return
|
||||
} else if (dirparts.length === 1 && /^cd\d{1,3}$/i.test(dirparts[0])) { // Next directory is the last and is a CD dir, create group
|
||||
audiobookGroup[_path] = [Path.posix.join(dirparts[0], item.name)]
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue