feat(xvideos): wire expand_hls_in_place after build_info#261
Merged
Conversation
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).
This was referenced May 3, 2026
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
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_infois sync (fixture-friendly, no http client), so the wiring lives inextractafterbuild_inforeturns. xvideos emitsM3u8Nativefor HLS — exercising theM3u8 | M3u8Nativematch arm broadened in #259, providing genuine cross-PR regression coverage rather than duplicating xnxx'sM3u8-only path.Test plan
#[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 withfragments.is_none()and identical URLs; length invariant preserved.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_mockito) unchanged and green.Reviews (per
mandatory-pre-push-review.md)expand_hls_urlfire on every variant URI / segment URI.WgczNetworkBase::extract_format_urlsappliesrequire_http_schemeupstream. One LOW non-blocker: a wiring-layer test asserting thatbuild_inforeturnsErron a non-http(s) HLS URL would close a documentation gap inherited from xnxx. Tracked as a joint follow-up — see linked issue.build_infoplacement correct;propagate_durationdoesn't depend onfragments. Codec style consistent. Order-locked assertions matchbuild_info's emission order. Test exercises theM3u8Nativearm, complementing xnxx'sM3u8coverage.Out of scope
Refs #258.