Skip to content

Keep the video link when the first source has an empty src - #304

Open
Jesseovo wants to merge 1 commit into
matthewwithanm:developfrom
Jesseovo:codex/video-source-selection
Open

Jesseovo wants to merge 1 commit into
matthewwithanm:developfrom
Jesseovo:codex/video-source-selection

Conversation

@Jesseovo

Copy link
Copy Markdown

When a video has multiple source elements and the first has an empty src, conversion drops the video URL entirely. The existing descendant search can also pick up a source belonging to fallback content.

This change selects the first direct source child with a nonblank src. An explicit video src still takes precedence. The regression test exercises an empty first candidate, multiple usable candidates, and an unrelated nested source.

The new regression failed on develop (the result was plain Watch). The full test suite passed locally after the change (96 tests, Python 3.9). Prepared and tested with OpenAI Codex.

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