stump icon indicating copy to clipboard operation
stump copied to clipboard

[BUG] Content Menu is Empty on a few EPUBs

Open wolsen9 opened this issue 5 months ago • 6 comments

Description of the Bug

When using the reader pane for a book (epub), the content menu is blank, it does not show the chapters for some books. This is less common but I have at least two books where Calibre shows the table of content and Stump does not.

I have noticed this for a few updates, so this has not been recently introduced.

I am able to read the book just fine.

Expected Behavior

I expect to be able to view the table of contents/index.

To Reproduce

Steps to reproduce the behavior and based on the book. The two books I have are 'I heard You Paint Houses', purchased from Kobo and ran through Calibre.

  1. Start reading the book.
  2. Once loaded, select the menu to view table of contents
  3. No sections loaded.

Screenshots

Comparing to another book purchase from Kobo and ran through Calibre WITH a working Content menu. Maybe this is a distraction to the real problem..

(GOOD) 'Into Thin Air' by Jon Krakauer Image Image

(BAD) 'I Heard You Paint Houses' by Charles Brandt Image Image

Debugging Information

The issue feels like it's a format related issue, where Stump does not process the content appropriately. Not an EPUB expert but opening the specific book in Calibre editor, and others that have working Content views, seem to have this line at the top of each HTML file <?xml version='1.0' encoding='utf-8'?>

Environment:

  • OS: OpenMediaVault 7 (Sandworm), docker plugin.
  • Device: Every browser so far, masOS Safari, iOS Safari, Windows Edge, Windows Firefox

Build Details:

  • Version: v0.0.11, 5d1a10b, July 26, 2025 5:57 PM
  • Docker: yes

Additional context

Let me know what else I can provide

wolsen9 avatar Jul 31 '25 14:07 wolsen9

Would you be able to email me the "bad" book so I can inspect it?

aaronleopold avatar Jul 31 '25 14:07 aaronleopold

I have emailed the book, thank you!

wolsen9 avatar Jul 31 '25 14:07 wolsen9

Thank you for sending the file! It was a big help. I looked into this during my lunch today, I'm pretty sure I have an idea of what is happening. The library I use for parsing ebooks seems to ignore any TOC items which are missing a playOrder attribute. The file you sent me does not have that attribute, therefore my assumption here is they are just not being processed as a result.

I'll aim to implement a fix ~over the weekend~ I just put one up on the upstream library 🙂

aaronleopold avatar Aug 01 '25 21:08 aaronleopold

The fix I made upstream hasn't seemed to make its way to a tagged release, so I'll try to slot some time over the next week or so to just pull the fix from git in the meantime

aaronleopold avatar Aug 19 '25 14:08 aaronleopold

I'll try to slot some time over the next week or so to just pull the fix from git in the meantime

I didn't ever do this 💀 I'm working on it now and it will be added to unstable once I am done

aaronleopold avatar Oct 05 '25 17:10 aaronleopold

after Discord discussion we decided that probably there also 2 more problems possibly caused by this issue:

  1. Contents menu is never working for me, but works at least some of the time for other users books(at least oromei said that) - clicking on the specific chapter does nothing.
  2. Book progress is preserved after the app reload, but not respected on book open(in library shows 30 percent, but opens on the first page anyway)

keramblock avatar Nov 03 '25 20:11 keramblock