Skip to content

Conversation

@CyanVoxel
Copy link
Member

This PR is a port of #387 which previously targeted thumbnails/Alpha-v9.4 to main (aka v9.5x).

This adds thumbnail/preview support for ePub files.

Co-Authored-By: Jorge Rui Da Silva Barrios <[email protected]>
@CyanVoxel CyanVoxel added Type: UI/UX User interface and/or user experience Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed labels Oct 10, 2024
@CyanVoxel CyanVoxel added this to the Alpha v9.5 (Post-SQL) milestone Oct 10, 2024
@CyanVoxel CyanVoxel added the Type: Enhancement New feature or request label Oct 10, 2024
tr = ThumbRenderer()
cover_image: Image.Image = tr._epub_cover(file_path)

assert cover_image is not None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to make a test which will actually check the final result as well similarly as done here for pdf:

b1bae1f

@CyanVoxel
Copy link
Member Author

Implemented the improved test 👍 I'll do the same for the other PRs as well.

Also we're having unrelated issues with the pytest workflow, so these tests are going to fail here regardless until that's resolved

@yedpodtrzitko
Copy link
Contributor

nit: the .epub file has almost 4MB, that feels like an overkill a bit. .epub is just .zip file, so maybe its content can be gutted a bit? The embedded fonts are not really necessary, and the image itself can be shrinked a bit too.

@CyanVoxel CyanVoxel merged commit d3c3e63 into main Oct 17, 2024
10 checks passed
@CyanVoxel CyanVoxel removed Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed labels Oct 17, 2024
@CyanVoxel CyanVoxel deleted the epub branch October 17, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants