Files
AndyHazz f37f66c58b 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.
2026-05-17 10:19:56 +02:00
..