Remove some unused code in AuthorCandidates.add

This commit is contained in:
mikiher 2023-10-07 21:28:25 +00:00
parent 786df450e5
commit f8f555b4b6

View File

@ -294,23 +294,9 @@ class BookFinder {
} }
add(author) { add(author) {
const authorTransformers = []
// Main variant
const cleanAuthor = this.bookFinder.cleanAuthorForCompares(author).trim() const cleanAuthor = this.bookFinder.cleanAuthorForCompares(author).trim()
if (!cleanAuthor) return false if (!cleanAuthor) return
this.candidates.add(cleanAuthor) this.candidates.add(cleanAuthor)
let candidate = cleanAuthor
for (const transformer of authorTransformers) {
candidate = candidate.replace(transformer[0], transformer[1]).trim()
if (candidate) {
this.candidates.add(candidate)
}
}
return true
} }
get size() { get size() {