-
-
Notifications
You must be signed in to change notification settings - Fork 18
Prevent 6.3 from 'fixing' audio IDs in 6.4 custom covers (BL-15902) #7704
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
base: Version6.3
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1273,6 +1273,13 @@ private void FixDuplicateAudioIdsInDataDiv(HtmlDom bookDOM, HashSet<string> idSe | |
| return; // shouldn't happen, but paranoia sometimes pays off, especially in running tests. | ||
| var nodes = dataDiv | ||
| .SafeSelectNodes("(.//div|.//span)[@id and contains(@class,'audio-sentence')]") | ||
| // We expect the customCover to have copies of other stuff in the data div. | ||
| .Where(x => | ||
| !( | ||
| x is SafeXmlElement e | ||
| && e.ParentWithAttributeValue("data-book", "customCover") != null | ||
| ) | ||
| ) | ||
| .ToList(); | ||
| var duplicateAudioIdsFixed = 0; | ||
| foreach (var audioElement in nodes) | ||
|
Comment on lines
1284
to
1285
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 In Root Cause and ImpactThe loop at Without the synchronization call, duplicate audio IDs that are fixed in the data div are not propagated to the rest of the book's DOM, leaving the book pages out of sync with the data div. This is a pre-existing bug but is in the method directly modified by this PR. (Refers to lines 1284-1297) Was this helpful? React with 👍 or 👎 to provide feedback.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JohnThomson Can reply/resolve this one? Thx. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩
customCoverstring literal only appears in C# code — verify it matches what 6.4 actually emitsThe filter added in this PR checks for
data-book="customCover"viae.ParentWithAttributeValue("data-book", "customCover"). However, searching the entire repository forcustomCoveronly returns these two lines inBook.cs. There are no HTML templates, test fixtures, or other references that confirm this is the exact attribute value used by version 6.4's custom cover feature. The commitc3f8b0378("Adds the cover layout control and allows a 'custom' cover (BL-15902)") is in the git log but its contents aren't available locally. It would be worth verifying thatcustomCoveris the exactdata-bookvalue used in the 6.4 branch.Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnThomson Can reply/resolve this one? Thx.