mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix db2.get_metadata to handle format correctly (it is already a list)
Fix Metadata to put composite fields back where they belong
This commit is contained in:
parent
ea29f4b683
commit
36ce874081
@ -99,7 +99,7 @@ class Metadata(object):
|
|||||||
continue
|
continue
|
||||||
cf['#value#'] = 'RECURSIVE_COMPOSITE FIELD ' + field
|
cf['#value#'] = 'RECURSIVE_COMPOSITE FIELD ' + field
|
||||||
cf['#value#'] = composite_formatter.safe_format(
|
cf['#value#'] = composite_formatter.safe_format(
|
||||||
d['display']['composite_template'],
|
cf['display']['composite_template'],
|
||||||
self, _('TEMPLATE ERROR')).strip()
|
self, _('TEMPLATE ERROR')).strip()
|
||||||
return d['#value#']
|
return d['#value#']
|
||||||
|
|
||||||
|
@ -584,9 +584,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
mi.title_sort = self.title_sort(idx, index_is_id=index_is_id)
|
mi.title_sort = self.title_sort(idx, index_is_id=index_is_id)
|
||||||
mi.formats = self.formats(idx, index_is_id=index_is_id,
|
mi.formats = self.formats(idx, index_is_id=index_is_id,
|
||||||
verify_formats=False)
|
verify_formats=False)
|
||||||
if hasattr(mi.formats, 'split'):
|
if len(mi.formats) == 0:
|
||||||
mi.formats = mi.formats.split(',')
|
|
||||||
else:
|
|
||||||
mi.formats = None
|
mi.formats = None
|
||||||
tags = self.tags(idx, index_is_id=index_is_id)
|
tags = self.tags(idx, index_is_id=index_is_id)
|
||||||
if tags:
|
if tags:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user