[Calibre] preserve uuid field in calibre metadata serialisation#15088
Merged
Conversation
Member
Author
|
a bit late now but @pazos, can you have a look? |
Member
Author
|
I also just realised that block could just be if k == "tags" or k == "authors" then
slim_book[k] = book[k] or rapidjson.array({})
else
slim_book[k] = book[k] or rapidjson.null
end |
Member
|
Yes, the diff hid the context. |
Member
Author
|
fixed in #15094 |
Frenzie
pushed a commit
that referenced
this pull request
Mar 8, 2026
0xstillb
pushed a commit
to 0xstillb/koreader-thai
that referenced
this pull request
May 9, 2026
…ader#15088) Otherwise calibre wil raise an error when its nil: ``` calibre, version 9.4.0 ERROR: Error: Error communicating with device 'uuid' Traceback (most recent call last): File "calibre/gui2/device.py", line 110, in run File "calibre/gui2/device.py", line 581, in _books File "calibre/devices/smart_device_app/driver.py", line 58, in _synchronizer File "calibre/devices/smart_device_app/driver.py", line 1316, in books KeyError: 'uuid' ```
0xstillb
pushed a commit
to 0xstillb/koreader-thai
that referenced
this pull request
May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bug fix
In
slim(), fields without explicit handling fall through to a bareslim_book[k] = book[k]assignment. In Lua, assigningnilto a table key removes it entirely, so any book with a missinguuidproduces a JSON payload with no field at all.Calibre's Smart Device driver expects the
uuidto be present on every book so a single missing one raises aKeyErrorand aborts the entire book enumeration. The connection succeeds and file transfer works, but the library appears empty on the calibre side.
uuidconsistently with series and series_index, falling back torapidjson.nullrather than silently dropping the key.This change is