Fix: Populate NavPoints even if playOrder not present#55
Merged
danigm merged 1 commit intodanigm:masterfrom Aug 4, 2025
Merged
Fix: Populate NavPoints even if playOrder not present#55danigm merged 1 commit intodanigm:masterfrom
NavPoints even if playOrder not present#55danigm merged 1 commit intodanigm:masterfrom
Conversation
Owner
|
I think that this implementation is okay enough, as far as I can tell, if there's no playorder, the order will be the order of appearance. I'm not sure if this is the right way of sorting in this case or if it's better to use a different approach, but in any case with this implementation is better than not parsing at all, so let's merge and fix the sorting in a future PR if we need an improvement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey there! 👋
Sorry for the random PR! This proposed change relates to a bug reported for Stump where a user reported an empty toc for some of their books. I believe I narrowed it down to
epub-rsonly includingNavPoints which have a definedplayOrder.I'm happy to discuss and iterate on this change if it isn't within your preferred scope for the library. I also want to note that it could be possible to add
idto theNavPointas a fallback for sorting if desired, but didn't implement any of that since it would kinda be inconsistent for theOrdimplementation in the scenario where oneNavPointhas aplay_orderbut another hasid.