mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Make series sequence cleanup slighlty less aggressive
This commit is contained in:
parent
77559d29bb
commit
29e9216bb1
@ -30,9 +30,7 @@ class Audible {
|
|||||||
cleanSeriesSequence(seriesName, sequence) {
|
cleanSeriesSequence(seriesName, sequence) {
|
||||||
if (!sequence) return ''
|
if (!sequence) return ''
|
||||||
let updatedSequence = sequence.replace(/Book /, '').trim()
|
let updatedSequence = sequence.replace(/Book /, '').trim()
|
||||||
if (updatedSequence.includes(' ')) {
|
updatedSequence = updatedSequence.replace(/(\d+)(, .*)/, '$1').trim()
|
||||||
updatedSequence = updatedSequence.split(' ').shift().replace(/,$/, '')
|
|
||||||
}
|
|
||||||
if (sequence !== updatedSequence) {
|
if (sequence !== updatedSequence) {
|
||||||
Logger.debug(`[Audible] Series "${seriesName}" sequence was cleaned from "${sequence}" to "${updatedSequence}"`)
|
Logger.debug(`[Audible] Series "${seriesName}" sequence was cleaned from "${sequence}" to "${updatedSequence}"`)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user