Skip to content

feat: sync book covers from KOReader plugin#108

Open
Poltavtcev wants to merge 1 commit into
GeorgeSG:masterfrom
Poltavtcev:feat/koreader-cover-sync
Open

feat: sync book covers from KOReader plugin#108
Poltavtcev wants to merge 1 commit into
GeorgeSG:masterfrom
Poltavtcev:feat/koreader-cover-sync

Conversation

@Poltavtcev
Copy link
Copy Markdown

Summary

  • After POST /api/plugin/import, the response includes missing_cover_md5 for books in the payload that have no cover file on the server yet.
  • New endpoint: POST /api/plugin/books/:md5/cover (multipart field file, form field version), same cover storage as the web UI (CoversService).
  • KOReader plugin (v0.3.1): resolves file paths via reading history + util.partialMD5, extracts cover (CoverBrowser cache when available, otherwise opens the document), uploads PNG.
  • BooksRepository.getByMd5 for cover upload; tests for import response and plugin cover route.
  • README / CHANGELOG updated for cover behaviour and plugin version.

Breaking change

  • Plugin version must be 0.3.1 (REQUIRED_PLUGIN_VERSION and const.VERSION must match).

Notes

  • Cover upload only runs for MD5s the server reports as missing; books not in KOReader reading history cannot be resolved to a path and are skipped (logged).

- Import response adds missing_cover_md5; POST /api/plugin/books/:md5/cover (multipart)
- CoversService.filterMd5WithoutCover; BooksRepository.getByMd5; plugin version 0.3.1
- Plugin: ReadHistory + partialMD5 path map, cover extract, multipart upload after import
- Tests, README and CHANGELOG
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