From 4d31b8e3dbdfd62e23904b31dff123e0ed27e7e3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 12 Oct 2018 18:48:10 +0530 Subject: [PATCH] Ignore trailing colons on words when filtering matches by title from amazon --- src/calibre/ebooks/metadata/sources/amazon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index cef24bfb8f..a8341ccc38 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -839,7 +839,7 @@ class Worker(Thread): # Get details {{{ class Amazon(Source): name = 'Amazon.com' - version = (1, 2, 3) + version = (1, 2, 4) minimum_calibre_version = (2, 82, 0) description = _('Downloads metadata and covers from Amazon') @@ -1386,9 +1386,9 @@ class Amazon(Source): if not self.use_search_engine: return True if title is not None: - tokens = {icu_lower(x) for x in title.split() if len(x) > 3} + tokens = {icu_lower(x).rstrip(':') for x in title.split() if len(x) > 3} if tokens: - result_tokens = {icu_lower(x) for x in mi.title.split()} + result_tokens = {icu_lower(x).rstrip(':') for x in mi.title.split()} if not tokens.intersection(result_tokens): log('Ignoring result:', mi.title, 'as its title does not match') return False