From 29e9216bb1a0b0772601438905ac68977febed0a Mon Sep 17 00:00:00 2001 From: mikiher Date: Tue, 12 Mar 2024 13:17:52 +0200 Subject: [PATCH] Make series sequence cleanup slighlty less aggressive --- server/providers/Audible.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/providers/Audible.js b/server/providers/Audible.js index e46ed323..a9e7b0cd 100644 --- a/server/providers/Audible.js +++ b/server/providers/Audible.js @@ -30,9 +30,7 @@ class Audible { cleanSeriesSequence(seriesName, sequence) { if (!sequence) return '' let updatedSequence = sequence.replace(/Book /, '').trim() - if (updatedSequence.includes(' ')) { - updatedSequence = updatedSequence.split(' ').shift().replace(/,$/, '') - } + updatedSequence = updatedSequence.replace(/(\d+)(, .*)/, '$1').trim() if (sequence !== updatedSequence) { Logger.debug(`[Audible] Series "${seriesName}" sequence was cleaned from "${sequence}" to "${updatedSequence}"`) }