feat(xnxx): wire expand_hls_in_place after format building#260
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_formatsemits 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-resolvedFormat.fragments; MP4 rows pass through untouched.Test plan
#[tokio::test] build_formats_hls_row_expanded_and_mp4_pass_throughcovers both wiring-regression failure modes: HLS row gains 2 fragments after expand; MP4 rows stayHttpswithfragments.is_none()and identical URLs.cargo fmt --check && cargo check && cargo clippy --all-targets -- -D warnings && cargo test && cargo check -p rdlp-desktopall green.url_matching_smoke,build_info_extracts_title_and_formats,extract_round_trip_via_fixture) unchanged and green.Reviews (per
mandatory-pre-push-review.md)validate_resolved_url) and body cap (MAX_PLAYLIST_BYTES) insideexpand_hls_urlfire on every variant URI / segment URI.WgczNetworkBase::extract_format_urlsalready filters non-http(s) schemes viarequire_http_scheme. Orchestrator-levelvalidate_url_securitycoversformat.urlat dispatch (same posture as eporner; pre-existing). No new logs, no credentials in test data.WgczFormatUrlsdirect construction in tests is well-formed (struct + fields arepub). Order-locked assertions catch silent reorder regressions. Nounwrap/expectlints triggered (test-block usage only).Out of scope
Refs #258.