Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Load epub covers via cover-image property #4106

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

Roukanken42
Copy link
Contributor

@Roukanken42 Roukanken42 commented Mar 11, 2025

Brief summary

Adds ability to load epub covers via cover-image property in manifest if the cover meta entry is missing.

Which issue is fixed?

Fixes #4105

In-depth Description

The implementation respects the EPUB 3.3 spec, and loads property="cover-image maybe-other-props" tagged manifest items as cover image, in case the cover metadata entry is missing. Fallback to the first image is still present if neither metadata entry, nor property can be found.

How have you tested this?

I've used this epub as example where this can help. Simply importing this into ABS will have the wrong cover before this change, but the good one after reimporting it with the change. (Same cover as Calibre loads)

Screenshots

Before:
image

After:
image

Calibre:
image

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@advplyr
Copy link
Owner

advplyr commented Mar 12, 2025

Thanks!

@advplyr advplyr merged commit e504bb0 into advplyr:master Mar 12, 2025
5 checks passed
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.

[Bug]: Some epubs fail to load the correct cover
2 participants