Skip to content

Fix movie insertion after reopening decks with unsupported media - #1163

Open
chenxiaokeng666-prog wants to merge 1 commit into
scanny:masterfrom
chenxiaokeng666-prog:fix/media-lookup-unsupported-parts
Open

chenxiaokeng666-prog wants to merge 1 commit into
scanny:masterfrom
chenxiaokeng666-prog:fix/media-lookup-unsupported-parts

Conversation

@chenxiaokeng666-prog

Copy link
Copy Markdown

Problem

After reopening a presentation containing a WAV media relationship, add_movie() can raise AttributeError while adding an otherwise supported MP4. The WAV may be loaded as a generic Part without sha1.

Change

Skip parts without a media hash during deduplication, as image lookup already does. A round-trip regression verifies the WAV and its relationship survive, and that two MP4 insertions share one media part. Scope an existing PartFactory mock to its own test so it cannot alter the regression. No audio format support is added.

Testing

The regression failed on 278b47b and passed with the patch. Also passed: 311 focused tests, 2,701 full pytest tests, and 973 Behave scenarios. The docs built on Python 3.9. Native PowerPoint playback and deletion in the PowerPoint UI were not tested.

Refs #926. The patch and tests were prepared with Codex assistance.

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.

1 participant