-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Page order are not correct while reading epub files (only contain imgaes) #788
Comments
Thank you for the report - Would you happen to be able to share a small epub file that exhibits the problem so I can try it out? I suspect we should look at the content.opf file when building the image list for epubs instead of just sorting by image name like we do with everything else. |
Hi,
Here is a small epub file.
The correct order is:
1. image/cover.jpg
2. image/vol-007881,jpg
3. image/vol-003600.jpg
4. image/vol-004248.jpg
5. image/vol-000962.jpg
6. image/vol-004233.jpg
7. image/vol-008535.jpg
8. image/vol-008906.jpg
9. image/vol-008719.jpg
10. image/vol-007116.jpg
11. image/vol-005270.jpg
12. image/vol-008993.jpg
13. image/vol-000458.jpg
14. image/createby.png
Thank you!
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: ***@***.***>
Sent: 2023εΉ΄4ζ2ζ₯ 6:26
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [Difegue/LANraragi] Page order are not correct while reading epub files (only contain imgaes) (Issue #788)
Thank you for the report - Would you happen to be able to share a small epub file that exhibits the problem so I can try it out?
I suspect we should look at the content.opf<https://ebooks.stackexchange.com/questions/1186/how-do-i-add-a-cover-and-other-pictures-to-my-epub> file when building the image list for epubs.
β
Reply to this email directly, view it on GitHub<#788 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJCPEG3YZPRR44CAR3HTEEDW7CTRTANCNFSM6AAAAAAWPNIYJY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@yihuasteven Sorry for the delay -- unfortunately you will need to upload the epub directly in this issue, attaching them via email does not work. Thanks! |
No problem, here is the equb file. Thanks. |
Had some time so I took a deeper look in the epub spec: Annoyingly so, we can't just look at Instead, we have to first look at META-INF/container.xml to know the location of the OPF file:
Then we can open and parse the OPF file to get the image order:
Turns out that the OPF file itself doesn't contain the order of the images either, just the list of the images -- The actual order needs to be figured out by parsing the html files.. In this epub, the first image in the OPF file is So basically, in order to have perfect image order support for epub, you need to implement the epub spec in full.I'm going to put this in volunteers welcome, but I think it'd be quite an ordeal... In the meantime @yihuasteven, what I can recommend would be to use an OPDS Client alongside your LRR server (with page streaming turned off) - Most OPDS clients are designed for EPUBs and will download and parse the full file themselves. |
|
hol up senpai have you checked out the GH Discussions first ?
Your issue/idea might've already been reported by someone else! π±βπ€
https://github.com/Difegue/LANraragi/discussions
YES
LRR Version and OS
Docker, Version 0.8.7
Bug Details
First of all, lrr is the comic server I like most.
I have many digital comicbooks in epub format which only contain images. While reading in lanraragi, the page order are not correctly arranged, but the the same epub file page order could be arranged in correct order in some other readers. (Tested in pc & android software like neat reader, calibri, comic server like komga)
Finally I found the problem is the image file name. If the images in the epub file were all named in order, it would be arranged correctly in lanraragi. However, if the images in epub were named randomly, the paper order in lrr would be wrong. I know little about the principle, I guess in epub file there would be a index file to link the page numbers and the image names. I'll show it by some screenshots.
The only methond I have found to solve it is to convert them into pdf files, but this takes much time to do so, and not all the epub files are convertable.
Matching Logs
Post any logs you have encountered when reproducing the bug.
If possible, switch the app to Debug Mode in order to have more logs.
Screenshots
In this file, the images are named in order. In llr, the page order is corret, either.
In this file, the images are named randomly, in other softwares, the page order is correct, but in llr, the page order is wrong.
The text was updated successfully, but these errors were encountered: