mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fallback to keywords if there is no keyword
This commit is contained in:
parent
6e0dd65885
commit
2336168f00
@ -179,8 +179,9 @@ def get_metadata(stream, extract_cover=True):
|
||||
mi.comments = data['description']
|
||||
if 'language' in data:
|
||||
mi.language = data['language']
|
||||
if data.get('keyword', ''):
|
||||
mi.tags = [x.strip() for x in data['keyword'].split(',') if x.strip()]
|
||||
kw = data.get('keyword') or data.get('keywords')
|
||||
if kw:
|
||||
mi.tags = [x.strip() for x in kw.split(',') if x.strip()]
|
||||
opfmeta = False # we need this later for the cover
|
||||
opfnocover = False
|
||||
if data.get('opf.metadata','') == 'true':
|
||||
|
Loading…
x
Reference in New Issue
Block a user