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

cover.jpg not included in epub file #20

Closed
K-o-R opened this issue May 5, 2022 · 5 comments
Closed

cover.jpg not included in epub file #20

K-o-R opened this issue May 5, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@K-o-R
Copy link

K-o-R commented May 5, 2022

Since updating, downloaded epubs are not showing the correct image for their thumbnails.

I checked by opening the .epub in 7-Zip and noticed there is no "cover.jpg" file in the archive, which was present in previous files and was just a copy of whichever image was identified as the cover. I can fix individual files by extracting the cover image, renaming it to "cover.jpg" and adding it to the .epub archive.

On some files it's not an issue, but this is because the cover image happens to be the first in the file alphabetically.

@gvellut
Copy link
Owner

gvellut commented May 5, 2022

By updating, you mean to version 35 from version 34? There shouldn't be any change to the downloading of the cover. I have tested with epub and update and I don't seem to have an issue.

The name "cover.jpg" file for the EPUB cover is only present when no cover can be found (and shouldn't correspond to any actual file in that case). Do the EPUB files with the issue with covers you mention (ie cover is included in the EPUB but you need to rename it) include the first part of the volume?

Also, what do you mean by "showing the correct image for their thumbnails" ? If you open the EPUB in an EPUB reader, isn't the cover shown? Or are you actually talking about something else?

If you are talking about the cover when you open the EPUB in a reader:

Can you tell me:

  • which command are you running?
  • which series have the issues? What parameters for jncep are you using?
  • for one of the series with the issue, can you run with the -d flag ie jncep -d .... and copy the result here?
  • You can also send me a file with the issue by email at [email protected]

Thank you.

@K-o-R
Copy link
Author

K-o-R commented May 6, 2022

Ah, I'm talking about the thumbnails in File Explorer which are basically whatever the first alphabetical image in the EPUB is.

No, not v34 to v35; I'm not sure what version I was running prior, only that it was not using the new version of the API as in issue #14 .

Prior to the API change here is an example complete volume:

image

...which has a cover.jpg, and displays...

image

...as the preview and thumbnail.

I have checked a random sample of volumes and all have a cover.jpg in them.

Using v35:

image

...you can see there is no cover.jpg, meaning it displays...

image

...as the preview/thumbnail.

Opening it in an EPUB reader is fine, as they are smart and looking for specific information to find the cover; File Explorer is dumb :-)

It's not a huge deal if I just have to manually add a cover file, just curious as to what would have changed.

If it is possible to force it to make a cover.jpg I certainly wouldn't complain ;-)

As always thank you for a super-useful tool!

@K-o-R
Copy link
Author

K-o-R commented May 6, 2022

Here's the output of something with no cover.jpg:

2022-05-06 19:45:03,490 jncep.utils WARNING Login with email '[highlight]***********[/]'...
2022-05-06 19:45:04,494 jncep.utils INFO Logged in with email '[highlight]***********[/]'
2022-05-06 19:45:04,494 jncep.utils WARNING ...
2022-05-06 19:45:04,501 jncep.jnclabs DEBUG LABS /app/v1/series/seirei-gensouki-spirit-chronicles/volumes skip=0
2022-05-06 19:45:04,793 jncep.utils WARNING Get content...
2022-05-06 19:45:04,793 jncep.jnclabs DEBUG LABS /app/v1/series/seirei-gensouki-spirit-chronicles skip=None
2022-05-06 19:45:05,075 jncep.jnclabs DEBUG LABS /app/v1/series/5b3b4e3892394fe802e25dcc/volumes skip=0
2022-05-06 19:45:05,373 jncep.jnclabs DEBUG LABS /app/v1/volumes/621fab44087fc53812d498a5/parts skip=0
2022-05-06 19:45:05,750 jncep.jnclabs DEBUG LABS EMBED /embed/621fabd15c7c745712cdb066/data.xhtml
2022-05-06 19:45:05,750 jncep.jnclabs DEBUG LABS EMBED /embed/62291eee9b13e2a4128a2c72/data.xhtml
2022-05-06 19:45:05,765 jncep.jnclabs DEBUG LABS EMBED /embed/62291f115c7c745712cdb1b1/data.xhtml
2022-05-06 19:45:05,765 jncep.jnclabs DEBUG LABS EMBED /embed/62291f82c5894166128e9d31/data.xhtml
2022-05-06 19:45:05,765 jncep.jnclabs DEBUG LABS EMBED /embed/623b8aaddd14865360966a3e/data.xhtml
2022-05-06 19:45:05,765 jncep.jnclabs DEBUG LABS EMBED /embed/624df36d0422fa161142fb11/data.xhtml
2022-05-06 19:45:05,765 jncep.jnclabs DEBUG LABS EMBED /embed/625735aeb2b223f812867a1b/data.xhtml
2022-05-06 19:45:05,765 jncep.jnclabs DEBUG LABS EMBED /embed/626072020422fa161142fc46/data.xhtml
2022-05-06 19:45:05,781 jncep.jnclabs DEBUG LABS EMBED /embed/62632481b2b223f812867ae5/data.xhtml
2022-05-06 19:45:05,781 jncep.jnclabs DEBUG LABS EMBED /embed/6263259447fbead312e5536e/data.xhtml
2022-05-06 19:45:05,781 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Volume-621fab44087fc53812d498a5/seirei19-cover-400.jpg
2022-05-06 19:45:05,781 jncep.jnclabs DEBUG (<jncep.jnclabs.JNCLabsAPI object at 0x0000019C86384610>, '621fabd15c7c745712cdb066', 'data.xhtml') in events
2022-05-06 19:45:05,781 jncep.jnclabs DEBUG (<jncep.jnclabs.JNCLabsAPI object at 0x0000019C86384610>, '62291eee9b13e2a4128a2c72', 'data.xhtml') in events
2022-05-06 19:45:06,173 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-623b8aaddd14865360966a3e/insert4.jpg
2022-05-06 19:45:06,173 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-623b8aaddd14865360966a3e/insert3.jpg
2022-05-06 19:45:06,220 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-621fabd15c7c745712cdb066/insert1.jpg
2022-05-06 19:45:06,220 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-621fabd15c7c745712cdb066/seirei19-cvr-860.jpg
2022-05-06 19:45:06,220 jncep.jnclabs DEBUG Cache hit (<jncep.jnclabs.JNCLabsAPI object at 0x0000019C86384610>, '621fabd15c7c745712cdb066', 'data.xhtml')
2022-05-06 19:45:06,252 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-624df36d0422fa161142fb11/insert6.jpg
2022-05-06 19:45:06,252 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-624df36d0422fa161142fb11/insert5.jpg
2022-05-06 19:45:06,252 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-62291eee9b13e2a4128a2c72/insert2.jpg
2022-05-06 19:45:06,252 jncep.jnclabs DEBUG Cache hit (<jncep.jnclabs.JNCLabsAPI object at 0x0000019C86384610>, '62291eee9b13e2a4128a2c72', 'data.xhtml')
2022-05-06 19:45:06,252 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-625735aeb2b223f812867a1b/insert7.jpg
2022-05-06 19:45:06,267 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-6263259447fbead312e5536e/insert9.jpg
2022-05-06 19:45:06,267 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-6263259447fbead312e5536e/insert10.jpg
2022-05-06 19:45:06,267 jncep.jnclabs DEBUG IMAGE https://d2dq7ifhe7bu0f.cloudfront.net/Part-626072020422fa161142fc46/insert8.jpg
2022-05-06 19:45:06,314 jncep.jnclabs DEBUG (<jncep.jnclabs.JNCLabsAPI object at 0x0000019C86384610>, https://d2dq7ifhe7bu0f.cloudfront.net/Part-621fabd15c7c745712cdb066/seirei19-cvr-860.jpg') in events
2022-05-06 19:45:06,518 jncep.jnclabs DEBUG Cache hit (<jncep.jnclabs.JNCLabsAPI object at 0x0000019C86384610>, 'https://d2dq7ifhe7bu0f.cloudfront.net/Part-621fabd15c7c745712cdb066/seirei19-cvr-860.jpg')
2022-05-06 19:45:07,177 jncep.utils WARNING Create EPUB...
2022-05-06 19:45:07,538 jncep.utils INFO Success! EPUB generated in '********\Google Drive\JNC\Seirei_Gensouki_Spirit_Chronicles_Volume_19_Complete.epub'!
2022-05-06 19:45:07,538 jncep.utils INFO Logout...

@gvellut
Copy link
Owner

gvellut commented May 6, 2022

OK I understand now.

I will see what I can do to add the option to force the name or just make sure the cover is always the first in alphabetical order by default.

@gvellut gvellut added the enhancement New feature or request label May 6, 2022
@gvellut
Copy link
Owner

gvellut commented May 13, 2022

I have made a new release (v36). The cover image is now named cover.jpg inside the EPUB and the names of the other images start with i (so the cover should come first inside the ZIP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants