Skip to content

Prevent 6.3 from 'fixing' audio IDs in 6.4 custom covers (BL-15902)#7704

Draft
JohnThomson wants to merge 1 commit intoVersion6.3from
patchForCustomCover
Draft

Prevent 6.3 from 'fixing' audio IDs in 6.4 custom covers (BL-15902)#7704
JohnThomson wants to merge 1 commit intoVersion6.3from
patchForCustomCover

Conversation

@JohnThomson
Copy link
Contributor

@JohnThomson JohnThomson commented Feb 20, 2026


Open with Devin

This change is Reviewable

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment on lines +1276 to +1282
// 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
)
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 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).

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@JohnThomson JohnThomson marked this pull request as draft February 27, 2026 22:22
@JohnThomson
Copy link
Contributor Author

Will probably close this...I think I made the 6.4 changes robust enough not to require it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants