mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Fixed bug that caused scanner to fail to get title when subtitle parsing is off, refactored possibly confusing variable declarations.
This commit is contained in:
parent
31fd75a895
commit
3153bdc5bb
@ -216,8 +216,9 @@ function getBookDataFromDir(folderPath, relPath, parseSubtitle = false) {
|
|||||||
// The may contain various other pieces of metadata, these functions extract it.
|
// The may contain various other pieces of metadata, these functions extract it.
|
||||||
var [folder, narrators] = getNarrator(folder)
|
var [folder, narrators] = getNarrator(folder)
|
||||||
if (series) { var [folder, sequence] = getSequence(folder) }
|
if (series) { var [folder, sequence] = getSequence(folder) }
|
||||||
|
var [folder, sequence] = series ? getSequence(folder) : [folder, null]
|
||||||
var [folder, publishedYear] = getPublishedYear(folder)
|
var [folder, publishedYear] = getPublishedYear(folder)
|
||||||
if (parseSubtitle) { var [title, subtitle] = getSubtitle(folder) } // Subtitle can be parsed from the title if user enabled
|
var [title, subtitle] = parseSubtitle ? getSubtitle(folder) : [folder, null]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
mediaMetadata: {
|
mediaMetadata: {
|
||||||
|
Loading…
Reference in New Issue
Block a user