Merge branch '1844210-get-metadata-keyword-from-odt-file' of https://github.com/pieplu/calibre

Fixes #1844210 [When adding .odt file as a book, keywords are ignored](https://bugs.launchpad.net/calibre/+bug/1844210)
This commit is contained in:
Kovid Goyal 2019-09-17 09:09:02 +05:30
commit 6e0dd65885
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -179,8 +179,8 @@ def get_metadata(stream, extract_cover=True):
mi.comments = data['description'] mi.comments = data['description']
if 'language' in data: if 'language' in data:
mi.language = data['language'] mi.language = data['language']
if data.get('keywords', ''): if data.get('keyword', ''):
mi.tags = [x.strip() for x in data['keywords'].split(',') if x.strip()] mi.tags = [x.strip() for x in data['keyword'].split(',') if x.strip()]
opfmeta = False # we need this later for the cover opfmeta = False # we need this later for the cover
opfnocover = False opfnocover = False
if data.get('opf.metadata','') == 'true': if data.get('opf.metadata','') == 'true':