Closed Nitrousoxide closed 7 months ago
Manually clearing the app cache in android does make it regenerate the ToC, so I do suspect it is a caching issue.
Yes, can you try changing your font size? It sounds totally similar to this: https://github.com/foobnix/LibreraReader/issues/1197#issuecomment-1834539196 It is just a temporary fix, but probably allows purging the ToC cache
Can do. I'll have to wait for another update for a book to get published so I can check to see if that fixes it, since it seemed to happen to every updates file. I'll report back if it fixed it or not in a few says when one come through.
fixed in new beta.librera.mobi
Actually, lucky me, a new chapter just released for another story I follow. Changing the text size did reflow the text but did not regenerate the ToC. The chapter notice at the bottom was also reporting the wrong chapter that it was in too.
Just tested the beta as I had another story add a chapter. While I wasn't able to replicate the exact steps I did with the google play version since the beta version does not have OPDS support, I did first download the previous version of the file using a separate OPDS browser, opened the file, deleted it, updated the file on my server, then manually downloaded the (updated) file again using my OPDS browser and Librera Reader did correctly rebuild the table of contents.
So that seems like it's fixed in the beta assuming there isn't something I did in my slightly changed procedure that worked around it, though I doubt that.
I've noticed an issue with the table of contents on redownloaded books that have additional chapters added since the last version was opened. The reader correctly renders the additional pages but does not populate the ToC with the updated chapters.
Steps to replicate
Generate an epub using fanficfare for a story on Royal Road. Open and read the epub, generating the cache for the file. Delete the epub when done New chapters are added so run fanficfare again to update the epub. Download new epub with the same name. Book is rendered but table of contents does not list new chapter.
Opening the file with another eBook reader properly displays the whole chapter list.
Some examples images from a file. Librera Reader Last chapter displayed in ToC![Screenshot_20231201-142942](https://github.com/foobnix/LibreraReader/assets/1363931/c52b7f84-5bbd-4ccc-a945-43965e4ceeca)
Later chapters render![Screenshot_20231201-142956](https://github.com/foobnix/LibreraReader/assets/1363931/85e83980-ba84-4ccf-8330-d6a2753ae19e)
Moonreader correctly displays the additional chapter.![Screenshot_20231201-143018](https://github.com/foobnix/LibreraReader/assets/1363931/5b045b65-c365-4be1-b291-d9a7f6df780a)
I don't know what is going on exactly, but I suspect it is using the ToC cache for the previous version of the file for the new altered one. If that is it you may want to run a hash of the file and compare it to the cache before using it to ensure that a file with the same name doesn't have altered content from the previous version.