plugins/calibre: preserve author_sort in slim metadata (#15398)
Calibre's author_sort field carries the curated "Surname, Forename" form for each author -- distinct from the display string in authors, and the only reliable way to get surname-ordering right for compound names, particles, and inverted-naming cultures (CJK, Hungarian). slim() currently strips this field when writing the device-side .metadata.calibre after a wireless transfer, even when desktop Calibre includes it in the transfer payload. Downstream plugins that want correct surname ordering can't get at it for libraries synced via the Calibre Companion plugin -- reported in the Bookshelf koplugin issue tracker by a user with ~2250 books all showing empty author_sort after sync, despite their desktop Calibre having the field populated on every book. Add "author_sort" to the used_metadata whitelist so it's preserved on the device-side file. Books without the field continue to load cleanly (slim's "or rapidjson.null" handles missing fields); on-disk size grows by a small per-book constant. search_used_metadata stays unchanged -- search displays the author string, not the sort form.
This commit is contained in:
1 parent
f51eb40d70
commit
f37f66c58b
1 file changed
+1
@@ -21,6 +21,7 @@ local used_metadata = {
|
||||
"size",
|
||||
"title",
|
||||
"authors",
|
||||
"author_sort",
|
||||
"tags",
|
||||
"series",
|
||||
"series_index"
|
||||
|
||||
Reference in new issue
Block a user