leotaku / mobi

This Go package implements writing KF8-style formatted MOBI and AZW3 books.
https://pkg.go.dev/github.com/leotaku/mobi
MIT License
33 stars 4 forks source link

kindle oasis3 can't display some files #2

Open ystyle opened 2 years ago

ystyle commented 2 years ago

After I generate azw3 with chaptered, when testing on kinlde oasis3, some files cannot be displayed on the device's library.

After testing, it was found that the first book of the chapters could not be displayed, and the subsequent second and third books could be displayed. I've tried changing the filename and the author has nothing to do with it. Tried reducing the number of chapters (200) and found that also only some of the files could be displayed.

In the attachment, file-1 cannot be displayed, and file-2 is normal

samples.zip

leotaku commented 2 years ago

This seems to be an issue that arises when a chapter, by coincidence, ends/starts exactly on a chunk border. I suspect this because the first file you have provided reports incorrect trailing byte sequences only in chapters with this property.

I'll try to implement a fix and ping you again when I've pushed it, so you can then test if this resolves your issue.

ystyle commented 2 years ago

thanks

leotaku commented 2 years ago

@ystyle ping

In case the new changes on master did not fix the issue, please provide a broken ebook generated with the new version of the library and ideally also the code used to generate it.

ystyle commented 2 years ago

In the attachment, file-1 cannot be displayed, and file-2、file-3 is normal samples.zip

ystyle commented 2 years ago

In the attachment, file-1 cannot be displayed, and file-2、file-3 is normal samples.zip

After testing, file-3 is also not displayed

leotaku commented 2 years ago

Right, in that case, I don't currently understand what could be the cause of this.

Unfortunately, I also don't currently have access to my own Kindle reader and won't for another 1-2 weeks, so I can't really debug the problem, which you say only appears on the Kindle Oasis 3.

Have you tested the generated e-books on other Kindle devices, or is the Oasis 3 the only device you are using?

ystyle commented 2 years ago

I only have ko3, but I found someone to test it, and all three files can be displayed on kpw3, 5.9.6.1