Pool-Of-Tears / Myne

An android app to download & read ebooks from Project Gutenberg, built with Jetpack Compose.
https://pooloftears.in
Apache License 2.0
1.07k stars 62 forks source link

[Bug]: Not Properly Importing #219

Open Solovertical opened 19 hours ago

Solovertical commented 19 hours ago

Steps to reproduce

From App

From Filemanger

Expected behaviour

It should show content properly

Actual behaviour

Not showing anything except Cover

Device name

Xiaomi 11i

Android version

14

Myne version

4.1.0

Device logs

No response

Additional information

No response

starry-shivam commented 19 hours ago

Please share the EPUB file you were having issues with so I can reproduce and investigate it properly. Although I understand what you probably mean, some screenshots of the issue would also be helpful.

Solovertical commented 18 hours ago

Diretly opened IMG_20240919_233549

When imported IMG_20240919_233515

I also noticed when you are at end of chapter while reading, it automatically move you at random place.

starry-shivam commented 18 hours ago

Thanks, please also share the EPUB file so i can reproduce and investigate the problem.

Solovertical commented 17 hours ago

Thanks, please also share the EPUB file so i can reproduce and investigate the problem.

https://www.mediafire.com/file/tko8pky4r11hf7r/Godaan+--+Premchand+--+True+Sign+Publishing+House.epub/file

starry-shivam commented 4 hours ago

Thanks. The issue is that the EPUB file you shared only has its cover page in the TOC index and does not include any other chapters. When you import the book and open it in the internal reader, it parses the book based on TOC file references to correctly map the chapters. However, since the TOC file was invalid in this case and only included the cover page, the only thing shown was the cover image. It works when you open the book directly from, say, the file manager because in that case, it parses based on the spine tag in the EPUB manifest, i.e., literally parsing every file inside the archive without focusing much on chapter mapping. I think I need to add checks for handling edge cases like these and fall back to spine-based parsing when the TOC is empty or only contains one item.