Loosen near-year match threshold when only one candidate exists
This commit is contained in:
1 parent
d7b7ee8b71
commit
cdb7e9a6f8
1 file changed
+2
-1
@@ -854,7 +854,8 @@ def best_match(media_type, results, year, query=None):
|
||||
]
|
||||
if near_year_matches:
|
||||
best = max(near_year_matches, key=near_title_similarity)
|
||||
if near_title_similarity(best) >= NEAR_YEAR_MATCH_MIN_SIMILARITY:
|
||||
threshold = YEAR_MATCH_MIN_SIMILARITY if len(near_year_matches) == 1 else NEAR_YEAR_MATCH_MIN_SIMILARITY
|
||||
if near_title_similarity(best) >= threshold:
|
||||
return best
|
||||
return None
|
||||
if not query_norm:
|
||||
|
||||
Reference in new issue
Block a user