Fix regex misplaced \b in volume parser

This commit is contained in:
advplyr 2021-09-18 13:09:30 -05:00
parent 6738c51f6e
commit 3ba3069894

View File

@ -169,7 +169,7 @@ function getAudiobookDataFromDir(abRootPath, dir, parseSubtitle = false) {
*/ */
var volumeNumber = null var volumeNumber = null
if (series) { if (series) {
var volumeMatch = title.match(/(-(?: ?))?\b((?:Book|Vol.?|Volume) \b(\d{1,3}))((?: ?)-)?/i) var volumeMatch = title.match(/(-(?: ?))?\b((?:Book|Vol.?|Volume) (\d{1,3}))\b((?: ?)-)?/i)
if (volumeMatch && volumeMatch.length > 3 && volumeMatch[2] && volumeMatch[3]) { if (volumeMatch && volumeMatch.length > 3 && volumeMatch[2] && volumeMatch[3]) {
volumeNumber = volumeMatch[3] volumeNumber = volumeMatch[3]
var replaceChunk = volumeMatch[2] var replaceChunk = volumeMatch[2]