From 89055f86552965e899a154c3517d22f85a966ee8 Mon Sep 17 00:00:00 2001 From: mikiher Date: Sun, 5 Nov 2023 16:14:26 +0000 Subject: [PATCH] Remove unnecessary includesAuthorDiff from sorting --- server/finders/BookFinder.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index e3a84be0..fa034bce 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -200,9 +200,6 @@ class BookFinder { getCandidates() { var candidates = [...this.candidates] candidates.sort((a, b) => { - // Candidates that include the author are likely low quality - const includesAuthorDiff = a.includes(this.cleanAuthor) - b.includes(this.cleanAuthor) - if (includesAuthorDiff) return includesAuthorDiff // Candidates that include only digits are also likely low quality const onlyDigits = /^\d+$/ const includesOnlyDigitsDiff = onlyDigits.test(a) - onlyDigits.test(b)