mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/j-howell/calibre
This commit is contained in:
commit
6be3e3b580
@ -254,11 +254,11 @@ def extract_metadata(container_data):
|
|||||||
|
|
||||||
# locate book metadata within the container data structures
|
# locate book metadata within the container data structures
|
||||||
|
|
||||||
|
metadata_entity = {}
|
||||||
|
|
||||||
for entity_type, entity_id, entity_value in container_data:
|
for entity_type, entity_id, entity_value in container_data:
|
||||||
if entity_type == PROP_METADATA:
|
if entity_type == PROP_METADATA:
|
||||||
for key, value in entity_value.items():
|
metadata_entity = entity_value
|
||||||
if key in METADATA_PROPERTIES:
|
|
||||||
metadata[METADATA_PROPERTIES[key]].append(value)
|
|
||||||
|
|
||||||
elif entity_type == PROP_METADATA2:
|
elif entity_type == PROP_METADATA2:
|
||||||
if entity_value is not None:
|
if entity_value is not None:
|
||||||
@ -270,6 +270,10 @@ def extract_metadata(container_data):
|
|||||||
# assume first image is the cover
|
# assume first image is the cover
|
||||||
metadata[COVER_KEY] = entity_value
|
metadata[COVER_KEY] = entity_value
|
||||||
|
|
||||||
|
for key, value in metadata_entity.items():
|
||||||
|
if key in METADATA_PROPERTIES:
|
||||||
|
metadata[METADATA_PROPERTIES[key]].append(value)
|
||||||
|
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user