Repository navigation
[libcalibre] bump books.last_modified on edits to custom values - #167
Draft
phildenhoff wants to merge 1 commit into
Draft
phildenhoff wants to merge 1 commit into
phildenhoff wants to merge 1 commit into
Conversation
libcalibre Test Coverage ReportOverall coverage: 80.19% Coverage breakdown available in the artifacts. |
set_custom_value and set_book_read_state wrote directly to the custom column tables without touching books.last_modified, unlike update_book, identifiers, and asset edits. Calibre relies on last_modified for OPF backups and change detection, so edits through these two paths were invisible to it. Both now compare the stored value before and after the write and only bump last_modified when it actually changed, matching Calibre's _update_last_modified(dirtied). Fixes #157. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Claude Sonnet 5 <[email protected]>
phildenhoff
force-pushed
the
claude/issue-157
branch
from
September 23, 2026 06:07
8447406 to
7ca9e95
Compare
libcalibre Test Coverage ReportOverall coverage: 80.24% Coverage breakdown available in the artifacts. |
|
Happy to test this against a real library if that helps — I've got a Calibre library I can run a before/after on, checking that Looks like it needs a rebase on master before it'll merge. |
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.
Calibre bumps
books.last_modifiedon every metadata change, and its OPF backups and change detection lean on that. Citadel didn't for custom-column and read-state edits, so those were invisible to Calibre.The tag edit in the report was already fixed on
mainby #146 (update_booknow touches the book), after v0.6.1 shipped. The boolcustom_column_<N>row in the report's diff is the read-state column, and that's the path this fixes, along withset_custom_valuegenerally.Both now read the stored value before and after the write and only bump
last_modifiedwhen it actually changed, like Calibre's_update_last_modified(dirtied). (update_bookstill touches unconditionally — I left that alone here.)Validation
cargo test -p libcalibre: the new tests intests/last_modified_test.rsfail without the fix and pass with it; the rest of the suite is unchanged. Not checked against a real Calibre library.Fixes #157