[enhamcement] Only add title candidate before and after all transforms

This commit is contained in:
mikiher 2023-10-04 14:53:12 +00:00
parent 10f5bc8cbe
commit 752bfffb11

View File

@ -206,13 +206,12 @@ class BookFinder {
let candidate = cleanTitle let candidate = cleanTitle
for (const transformer of titleTransformers) { for (const transformer of titleTransformers)
candidate = candidate.replace(transformer[0], transformer[1]).trim() candidate = candidate.replace(transformer[0], transformer[1]).trim()
if (candidate) {
if (candidate)
this.candidates.add(candidate) this.candidates.add(candidate)
} }
}
}
get size() { get size() {
return this.candidates.size return this.candidates.size