-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Cover image not extracted from EPUB files #100
Comments
I have 754 epub files under Jellyfin management and only 5 of them have cover image correctly extracted, so I have had a look on this issue and figured that there are 3 things to be improved.
There is a place where the plugin takes calibre:series_index and convert it to Int32 but it's failing because calibre:series_index often has decimal. (e.g. "1.0")
There is a code to check opfRootDirectory and if it's empty or null, it gives up to extract image. jellyfin-plugin-bookshelf/Jellyfin.Plugin.Bookshelf/Providers/Epub/EpubMetadataImageProvider.cs Lines 104 to 108 in 5baaa87
Image extraction will fail to find a cover image if the epub file has an another object with "cover" id. Also I have some epub files that id for the cover image is "my-cover-image" instead of just a "cover-image". jellyfin-plugin-bookshelf/Jellyfin.Plugin.Bookshelf/Providers/OpfReader.cs Lines 57 to 67 in 5baaa87
With above changes, I was able to extract 100% of my epub files. I will try to make a pull-request for these changes. Thanks! |
PDF books have the same issue, would be great if those could also generate their own cover image using the first page. |
For the time being, this command will generate thumbnails using the pdfs first page. (To be more specific, it recursively looks through all folders in and below from where the command was executed and creates a jpg image beside every pdf and names it the same as the pdf. You can change resolution and quality with for /r %f in (*.pdf) do magick convert -density 120 -quality 70 "%f[0]" "%~dpnf.jpg" Requires https://imagemagick.org and https://ghostscript.com installed. (You can either add the installed magick to your ENV path var or use the path to the exe instead of the word "magick" in the command) Windows - cmd |
This issue can be closed if it was merged, right? |
Bookshelf fails to extract the cover image from some books in the EPUB format. The name of the book as well as the description and other details gets loaded correctly though.
One of the books that cause this issue is https://www.feedbooks.com/book/1421/the-adventures-of-sherlock-holmes
Going into Jellyfin's metadata folder after the book is imported, I can see a
poster.jpg
file created that is not an image actually.The text was updated successfully, but these errors were encountered: