Repository navigation
Use Reader images as KOReader article covers - #44
Merged
Merged
Conversation
Owner
|
Hi @Kageetai , Thank you so much for your interest. I'm sorry that I was too busy last week. I'll take care of this PR and I'll merge it after testing on my Kindle |
Contributor
Author
|
Thanks for looking into it. I could only test it on my Android device |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTrfmhAJ2zK6Z875JKAhpm
- Covers are off by default: "Download article covers" in Settings/Image Download, independent of article image downloads. - New articles get their cover at download. Articles already on the device wait in covers_pending and get theirs within 30 seconds per sync; an article open in the reader is skipped until a later sync. - One attempt per article. Only temporary failures (no response, 408, 429, 5xx, local write failure) are kept, in covers_failed, for "Retry failed covers". Successes and permanent failures store nothing, so a cover the user removed stays removed. Both lists are pruned to the articles on the device. - After three network errors in a row, a sync stops fetching covers. - Covers over 1 MB are logged and over 2 MB stopped while downloading. Images under 200 px on a side or over 4 million pixels are refused from their header, before decoding. - Requests accept only formats KOReader renders, use KOReader's timeout sink so the 15 s total applies, and every failure is logged with its reason. - One directory scan per sync instead of two per existing article, and only InvalidateMetadataCache is broadcast per cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTrfmhAJ2zK6Z875JKAhpm
Owner
|
I tested on my Kindle Paperwhite and it works great! |
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.
Downloaded HTML articles currently ignore Reader's
image_url, so their Reader cover is missing in KOReader. This change downloads that image as a KOReader custom cover for new articles and fills in missing covers for existing downloads without rewriting their HTML.Cover downloads follow the existing image-download toggle and size limit. Existing custom covers are preserved. Unavailable, corrupt, or oversized images do not fail article sync; partial copies are removed so a later sync can retry. Successful downloads invalidate KOReader's metadata cache.
Validation:
The image-heavy article freeze is tracked separately in #43. Article HTML/image processing is unchanged here, and the freeze also reproduces using a fresh HTML copy without a custom cover.