Skip to content

fix: preserve complete book metadata during import and repair - #689

Open
cha1latte wants to merge 11 commits into
codedogQBY:mainfrom
cha1latte:fix/complete-book-metadata
Open

fix: preserve complete book metadata during import and repair#689
cha1latte wants to merge 11 commits into
codedogQBY:mainfrom
cha1latte:fix/complete-book-metadata

Conversation

@cha1latte

Copy link
Copy Markdown
Contributor

What changed

  • preserve complete embedded metadata from EPUB, MOBI/AZW, PDF, TXT, and UMD imports on desktop and Android
  • merge metadata in a strict fill-only order: saved user values, import/catalog context, embedded book metadata, then filename fallback
  • repair missing metadata from Book Details without overwriting edits, ratings, reviews, page/chapter counts, tags, or existing covers
  • support real Foliate and PDF metadata shapes, validated ISBNs, normalized publication dates, and correctly typed JPEG/PNG/WebP/GIF cover files
  • prevent asynchronous cover extraction from racing with or orphaning a user-selected/catalog cover

Why

Book Details already had fields for publisher, language, ISBN, publication date, description, subjects, and cover art, but import paths discarded much of the metadata parsers already exposed. Existing repair code was also limited and could race with user edits.

This keeps the current local-file architecture and fills only missing values. It does not add online metadata lookup.

Validation

  • TZ=UTC pnpm --filter @readany/core test — 595 passed
  • TZ=UTC pnpm --filter @readany/app-expo test — 22 passed
  • pnpm --filter @readany/app-expo exec tsc --noEmit
  • pnpm --filter app build
  • targeted Biome check — 20 files clean
  • git diff --check upstream/main...HEAD
  • independent final code review — no Critical, Important, or Minor findings

Manual gap

The automated parser/import/repair coverage and desktop production build pass, but this branch has not yet been exercised with a representative real-book corpus in the live Android and Tauri UIs.

@cha1latte
cha1latte marked this pull request as ready for review August 17, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant