mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -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
|
||||
cf['#value#'] = 'RECURSIVE_COMPOSITE FIELD ' + field
|
||||
cf['#value#'] = composite_formatter.safe_format(
|
||||
d['display']['composite_template'],
|
||||
cf['display']['composite_template'],
|
||||
self, _('TEMPLATE ERROR')).strip()
|
||||
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.formats = self.formats(idx, index_is_id=index_is_id,
|
||||
verify_formats=False)
|
||||
if hasattr(mi.formats, 'split'):
|
||||
mi.formats = mi.formats.split(',')
|
||||
else:
|
||||
if len(mi.formats) == 0:
|
||||
mi.formats = None
|
||||
tags = self.tags(idx, index_is_id=index_is_id)
|
||||
if tags:
|
||||
|
Loading…
x
Reference in New Issue
Block a user