When downloading metadata from amazon, do not auto-correct the title case if the books language is not English

This commit is contained in:
Kovid Goyal 2013-01-29 09:37:55 +05:30
parent 142c3c4feb
commit 2bb7ed5442

View File

@ -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)