Skip to content

feat(xvideos): wire expand_hls_in_place after build_info#261

Merged
crippledgeek merged 1 commit into
developfrom
feature/hls-fragments-xvideos
May 3, 2026
Merged

feat(xvideos): wire expand_hls_in_place after build_info#261
crippledgeek merged 1 commit into
developfrom
feature/hls-fragments-xvideos

Conversation

@crippledgeek
Copy link
Copy Markdown
Owner

Summary

Third of 7 site migrations under #258. Stacked on PR #260 — base is feature/hls-fragments-xnxx. Once #259 and #260 merge, this PR's base will be retargeted to develop or rebased.

xvideos's build_info is sync (fixture-friendly, no http client), so the wiring lives in extract after build_info returns. xvideos emits M3u8Native for HLS — exercising the M3u8 | M3u8Native match arm broadened in #259, providing genuine cross-PR regression coverage rather than duplicating xnxx's M3u8-only path.

Test plan

  • New #[tokio::test] hls_native_row_expanded_and_mp4_pass_through — synthetic 3-row vec (M3u8Native HLS + HD + SD MP4) against mockito master playlist. Asserts: HLS row gains 2 fragments; both MP4 rows pass through with fragments.is_none() and identical URLs; length invariant preserved.
  • Pre-PR gate: cargo fmt --check && cargo check && cargo clippy --all-targets -- -D warnings && cargo test && cargo check -p rdlp-desktop all green.
  • Existing xvideos tests (url_matching_smoke, build_info_extracts_title_and_formats, extract_round_trip_via_mockito) unchanged and green.

Reviews (per mandatory-pre-push-review.md)

  • security-reviewer (subagent)Approved. Wiring is structurally identical to xnxx's. SSRF gate, body cap, segment count cap inside expand_hls_url fire on every variant URI / segment URI. WgczNetworkBase::extract_format_urls applies require_http_scheme upstream. One LOW non-blocker: a wiring-layer test asserting that build_info returns Err on a non-http(s) HLS URL would close a documentation gap inherited from xnxx. Tracked as a joint follow-up — see linked issue.
  • code-reviewer (subagent)Approved. Post-build_info placement correct; propagate_duration doesn't depend on fragments. Codec style consistent. Order-locked assertions match build_info's emission order. Test exercises the M3u8Native arm, complementing xnxx's M3u8 coverage.

Out of scope

Refs #258.

Migrates xvideos to the HLS Format.fragments fast path. The shared helper
hoisted in PR #259 already matches DownloadProtocol::M3u8Native — no helper
change needed; xvideos's `build_info` emits an `M3u8Native` HLS row plus
muxed MP4 rows, and the expand call rewrites the HLS row into per-variant
fragments while leaving MP4 rows untouched.

- xvideos::extract calls `crate::hls::expand_hls_in_place(info.formats, http)`
  immediately after `build_info` returns, since `build_info` is sync and
  fixture-friendly (no http client available there).
- New integration test `hls_native_row_expanded_and_mp4_pass_through`
  builds a 3-row vec (HLS + HD + SD MP4) against a mockito-served master
  playlist and asserts: HLS row gains 2 fragments, MP4 rows pass through
  with `fragments.is_none()` and identical URLs.

Refs #258 (HLS fragments parity follow-ups: 3/7 extractors migrated).
@crippledgeek crippledgeek changed the base branch from feature/hls-fragments-xnxx to develop May 3, 2026 18:34
@crippledgeek crippledgeek merged commit 7e1fd5b into develop May 3, 2026
@crippledgeek crippledgeek deleted the feature/hls-fragments-xvideos branch May 3, 2026 21:50
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