When finding similar books by author ignore "et al." suffix on author names. Fixes #2116804 [[Enhancement] Books by same author should ignore "et al."](https://bugs.launchpad.net/calibre/+bug/2116804)

This commit is contained in:
Kovid Goyal 2025-07-17 11:16:29 +05:30
parent 1ddbaa2bd8
commit aa2aef48f8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -85,6 +85,11 @@ class SimilarBooksAction(InterfaceAction):
if isinstance(val, string_or_bytes):
val = [val]
if typ == 'authors':
import re
def remove_et_al(au):
return re.sub(r'\s+et al\.$', '', au)
val = list(map(remove_et_al, val))
search = [col + ':"='+t.replace('"', '\\"')+'"' for t in val]
if search:
self.gui.search.set_search_string(join.join(search),