1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-21 09:24:50 +00:00

Bugfix backup metadata for custom date, custom categories

This commit is contained in:
Ozzie Isaacs
2023-03-20 19:35:38 +01:00
parent dfb49bfca9
commit e3fffa8a8f
2 changed files with 7 additions and 4 deletions

View File

@@ -218,7 +218,7 @@ class TaskBackupMetadata(CalibreTask):
extra = None
cc_entry = getattr(book, "custom_column_" + str(cc.id))
if cc_entry.__len__():
value = cc_entry[0].value
value = [c.value for c in cc_entry] if cc.is_multiple else cc_entry[0].value
extra = cc_entry[0].extra if hasattr(cc_entry[0], "extra") else None
etree.SubElement(metadata, "meta", name="calibre:user_metadata:#{}".format(cc.label),
content=cc.to_json(value, extra, sequence),