Skip to content

feat(xnxx): wire expand_hls_in_place after format building#260

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

feat(xnxx): wire expand_hls_in_place after format building#260
crippledgeek merged 1 commit into
developfrom
feature/hls-fragments-xnxx

Conversation

@crippledgeek
Copy link
Copy Markdown
Owner

Summary

Second of 7 site migrations under #258. Stacked on PR #259 — base branch is feature/hls-fragments-eporner. Once #259 merges to develop, this PR's base will be retargeted (or rebased) onto develop.

xnxx's existing build_formats emits one HLS row (DownloadProtocol::M3u8) plus 0-2 muxed MP4 rows (DownloadProtocol::Https). After this change, the HLS row is expanded into per-variant rows with pre-resolved Format.fragments; MP4 rows pass through untouched.

Test plan

  • New #[tokio::test] build_formats_hls_row_expanded_and_mp4_pass_through covers both wiring-regression failure modes: HLS row gains 2 fragments after expand; MP4 rows stay Https with fragments.is_none() and identical URLs.
  • Pre-PR gate: cargo fmt --check && cargo check && cargo clippy --all-targets -- -D warnings && cargo test && cargo check -p rdlp-desktop all green.
  • Existing xnxx fixture-based tests (url_matching_smoke, build_info_extracts_title_and_formats, extract_round_trip_via_fixture) unchanged and green.

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

  • security-reviewer (subagent)Approved. Confirmed the call site mirrors the eporner posture audited in feat(hls): hoist expand_hls_in_place + migrate eporner to fragments parity #259: SSRF gate (validate_resolved_url) and body cap (MAX_PLAYLIST_BYTES) inside expand_hls_url fire on every variant URI / segment URI. WgczNetworkBase::extract_format_urls already filters non-http(s) schemes via require_http_scheme. Orchestrator-level validate_url_security covers format.url at dispatch (same posture as eporner; pre-existing). No new logs, no credentials in test data.
  • code-reviewer (subagent)Approved. Wiring placement matches the rolled-out pattern; the new test exercises real failure modes (helper removal + Https rewrite); WgczFormatUrls direct construction in tests is well-formed (struct + fields are pub). Order-locked assertions catch silent reorder regressions. No unwrap/expect lints triggered (test-block usage only).

Out of scope

Refs #258.

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

- xnxx::extract calls `crate::hls::expand_hls_in_place(formats, http)`
  immediately after `build_formats(&format_urls)` and before the empty
  check.
- New integration test `build_formats_hls_row_expanded_and_mp4_pass_through`
  builds a 3-row vec (HLS + low MP4 + high 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: 2/7 extractors migrated).
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