From 2bb7ed5442b3f375c98b802a42baa99cb17704ad Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 29 Jan 2013 09:37:55 +0530 Subject: [PATCH] When downloading metadata from amazon, do not auto-correct the title case if the books language is not English --- src/calibre/ebooks/metadata/sources/amazon.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 63783ba8eb..7df57a5586 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -614,10 +614,14 @@ class Amazon(Source): return domain def clean_downloaded_metadata(self, mi): - if mi.title and self.domain in ('com', 'uk'): + docase = ( + mi.language == 'eng' or + (mi.is_null('language') and self.domain in {'com', 'uk'}) + ) + if mi.title and docase: mi.title = fixcase(mi.title) mi.authors = fixauthors(mi.authors) - if self.domain in ('com', 'uk'): + if mi.tags and docase: mi.tags = list(map(fixcase, mi.tags)) mi.isbn = check_isbn(mi.isbn)