Prevent 6.3 from 'fixing' audio IDs in 6.4 custom covers (BL-15902)#7704
Prevent 6.3 from 'fixing' audio IDs in 6.4 custom covers (BL-15902)#7704JohnThomson wants to merge 1 commit intoVersion6.3from
Conversation
b92cac0 to
467dd68
Compare
| // 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 | ||
| ) | ||
| ) |
There was a problem hiding this comment.
🚩 CustomCover IDs excluded from idSet may affect downstream duplicate detection
The .Where() filter at src/BloomExe/Book/Book.cs:1277-1282 excludes customCover audio elements from being processed, meaning their IDs are never added to idSet. This idSet is subsequently used in FixDuplicateAudioIdInBookPages (line 1301) to detect duplicates on pages. If a page element has the same audio ID as a customCover data-div element but NOT the same as any non-customCover data-div element, it won't be flagged as a duplicate. This appears to be the intended behavior — the customCover is expected to have copies of IDs from elsewhere, and pages referencing those IDs should not be "fixed". However, it's worth confirming that the customCover page's audio elements are also correctly handled (they would be checked via HtmlDom.IsNodePartOfDataBookOrDataCollection at line 1312 which skips data-book elements).
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Will probably close this...I think I made the 6.4 changes robust enough not to require it. |
This change is