OpenComic icon indicating copy to clipboard operation
OpenComic copied to clipboard

Support epub and mobi format

Open ghost opened this issue 3 years ago • 16 comments

ghost avatar Oct 25 '22 14:10 ghost

This seems to duplicate https://github.com/ollm/OpenComic/issues/91

NomarCub avatar Oct 17 '23 16:10 NomarCub

any chance this is supported soon?

ghost avatar Oct 18 '23 00:10 ghost

I plan to add support for epub in the next beta version, regarding the mobi format, I do not plan to add it unless it is very easy to implement, since it is an unmaintained format https://en.wikipedia.org/wiki/Mobipocket#Legacy

ollm avatar Oct 18 '23 08:10 ollm

I have just published the latest beta version with preliminary support for the EPUB format: v1.0.0-beta.5

At the moment there are only basic functions to read epub, currently it is not possible to interact with the epub since it gave errors with the click/drag/touch events that OpenComic already has.

There is also a new menu to customize the display of the epub:

Captura de pantalla (185)

Anything that doesn't work as expected or any bug, please comment here, with an example file if possible and related.

ollm avatar Nov 24 '23 17:11 ollm

The following error occured when I clicked on the reading manga / reading webtoon option in the page layout tab.

image

It occured in an EPUB file and content screen also went blank.

Ariaryy avatar Jan 10 '24 18:01 Ariaryy

I can't reproduce the error, you can check if is still happening in v1.1.0?

ollm avatar Jan 13 '24 10:01 ollm

The error message doesn't pop up anymore but the content of the page still disapears. One thing I would like to point out is that, I wasn't reading a manga or webtoon when I tried the option, it was a novel, an epub file. I also noticed that the same thing happens when I switch between slide reading and vertical reading modes.

Ariaryy avatar Jan 13 '24 10:01 Ariaryy

Another issue I came across: The book does not load and the loading animation is stuck. Restarting the app multiple times sometimes allows the book to open. image

Ariaryy avatar Jan 13 '24 10:01 Ariaryy

Can you send me the epub file in which the error happens? I have tried some epubs and the problem does not appear, it is possible that it is only caused by some epubs, you can attach it here or send it to my email: [email protected]

Also, you can try to ope DevTools to see if there are any other message errors (Debbug > Toogle DevTools)

ollm avatar Jan 14 '24 11:01 ollm

I'll send the epub to your email. I looked at the DevTools and found this

image image image

image

Looks like it's stuck at an infinite loop as the warning messages keep on increasing. Also worth noting that there's pretty high disk usage while that's happening.

Ariaryy avatar Jan 15 '24 06:01 Ariaryy

I have been testing and the same error that appears happens when the screen has an intermediate scale (150%, 175%, etc. in Windows), a decimal value was being passed to a function that did not allow it, this should solve it 496272442747e466638e890a187f84b100deda14

Here you can download the v1.1.0 for windows with this fix: https://mega.nz/file/7OQykRBY#fIX716U4Pa0amv21aoyuU9j25QpeBkc4VWugOqk7S14

ollm avatar Jan 16 '24 17:01 ollm

image

These warning messages continue to populate as soon as a folder containing ebooks is opened or an ebook file is opened. There is high disk usage by the application. This does not occur with other file types.

Ariaryy avatar Jan 21 '24 13:01 Ariaryy

It seems to be stuck in a loop trying to read an epub.

Try this build (https://mega.nz/file/nPwhCYKA#CTV_GYTRU50Isv2ERE9pIGmUv8UPMNtb5y4CcrsyISU), an error when reading epub in Windows has been fixed (Reserved characters for Windows were being used for image names in epubs) and it could be related c00285db719b474cb54876d7312f685140dded74

I have also added some console.log to know which files OpenComic is left with in a loop https://github.com/ollm/OpenComic/commit/c00285db719b474cb54876d7312f685140dded74#diff-9687d4dcb3887e69c30cd26bd4c7ff3d9fd6b503511d9eba6e41f4813d142618R1048

Also the first time you open this version you will see a thumbnail regeneration, since due to the reserved characters error I had to force the deletion of the cache https://github.com/ollm/OpenComic/commit/c00285db719b474cb54876d7312f685140dded74#diff-612cfbcca6af4cd2a58df5afe349b4becb870ed6934f289cfe7b384c01b0b4ebR35-R59

ollm avatar Jan 22 '24 09:01 ollm

The issue seems to be fixed for a few epub files but not all of them, I've mailed you the epub file in which there's an infinite loop.

Ariaryy avatar Jan 22 '24 18:01 Ariaryy

Thanks for the sample file.

I have found the cause of the error, OpenComic would go into a loop if the epub file had the zip compression corrupted 6388a9ef8eb118e1d337fb6becd68ec64b5defc3

I have also improved the error message that appears when a file cannot be opened.

Build with fix: https://mega.nz/file/Hf4WRTIL#_gfCjq91K3T8aTWCbjmxm2t0rcJwxnpyI3v4Elxl9Lk

ollm avatar Jan 26 '24 17:01 ollm

Enabling and Disabling the 'Double Page' toggle under the 'Page Layout' tab caused the following error:

image

It also jumps to the a page near the end of the epub and gets stuck on the loading icon.

Ariaryy avatar Feb 02 '24 17:02 Ariaryy