mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-28 12:30:00 +00:00
Lower case text, some epub have uppercased which is beyond iso639 standard.
This commit is contained in:
parent
13b4ae4c24
commit
d5e525305d
@ -51,6 +51,7 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension):
|
||||
try:#maybe dc:language isn't present, less possible but possible
|
||||
lang = p.xpath('dc:language/text()', namespaces=ns)[0]
|
||||
lang = lang.split('-', 1)[0]
|
||||
lang.lower()
|
||||
if len(lang) == 2:
|
||||
epub_metadata['languages'] = isoLanguages.get(part1=lang).name
|
||||
elif len(lang) == 3:
|
||||
|
Loading…
Reference in New Issue
Block a user