-
-
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 | ||
| ) | ||
| ) | ||
|
Comment on lines
+1276
to
+1282
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. 🚩 CustomCover IDs excluded from idSet may affect downstream duplicate detection The Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| .ToList(); | ||
| var duplicateAudioIdsFixed = 0; | ||
| foreach (var audioElement in nodes) | ||
JohnThomson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
@@ -1283,6 +1290,7 @@ private void FixDuplicateAudioIdsInDataDiv(HtmlDom bookDOM, HashSet<string> idSe | |
| { | ||
| var newId = FixDuplicateAudioId(audioElement, id); | ||
| idSet.Add(newId); | ||
| duplicateAudioIdsFixed++; | ||
| } | ||
| } | ||
| // OK, now fix all the places any duplicates were used in the book's pages. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.