From 6ff66370fea06be4e8793615f9a60b4d35a8d7cc Mon Sep 17 00:00:00 2001 From: Cassie Esposito Date: Thu, 19 May 2022 21:07:04 -0700 Subject: [PATCH] Use {} instead of [] for narrators tag. Removed logging left over from debugging. --- server/utils/scandir.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/utils/scandir.js b/server/utils/scandir.js index 726183c9..faeab015 100644 --- a/server/utils/scandir.js +++ b/server/utils/scandir.js @@ -215,9 +215,6 @@ function getBookDataFromDir(folderPath, relPath, parseSubtitle = false) { // Audio files will always be in the directory named for the title var [title, narrators] = getTitleAndNarrator(splitDir.pop()) - const parseNameString = require('./parseNameString') - console.log(`\n\n\n${JSON.stringify(parseNameString.parse(narrators), 0, 2)}\n\n\n`) - var series = null var author = null // If there are at least 2 more directories, next furthest will be the series @@ -305,7 +302,7 @@ function getBookDataFromDir(folderPath, relPath, parseSubtitle = false) { } function getTitleAndNarrator(folder) { - let pattern = /^(?.*)\[(?<narrators>.*)\] *$/ + let pattern = /^(?<title>.*)\{(?<narrators>.*)\} *$/ let match = folder.match(pattern) return match ? [match.groups.title.trimEnd(), match.groups.narrators] : [folder, null] }