Cleanup: drop playlist + suggestion + dead client constants + suppress_unused stubs

Round-2 cruft audit punch list — mechanical deletes, no behavior change.

Whole modules deleted (no wrapper consumer):
  * youtube/playlist_extractor.rs (297 LOC) — full playlist extraction
  * youtube/linkhandler/playlist.rs (81 LOC) — playlist URL parser
  * youtube/suggestion_extractor.rs (91 LOC) — search-as-you-type
  * tests/stream_phase4_offline.rs (186 LOC) — tautological test

Dead pub fns + enum variants + constants:
  * WEB_REMIX_* constants (3) + WEB_MUSIC_ANALYTICS_* constants (3)
  * InnertubeClientRequestInfo::of_web_music_analytics_charts_client
    factory + its charts_client_omits_platform_and_screen test
  * SearchFilter::Music{Songs,Videos,Albums,Playlists,Artists} variants
    (5 of 9 cases) + uses_music_endpoint helper + the search_extractor
    'music search not implemented' reject branch
  * Two #[allow(dead_code)] _suppress_unused stub fns and the imports
    they were keeping alive (std::sync::Arc in js/extractor.rs,
    NetworkError in stream_extractor.rs)

Renamed:
  * search_extractor::test_helpers -> renderer_helpers. Mis-named:
    it's production code called from channel.rs, not a test fixture.

potoken/ kept and documented as the designed Phase-5 extension point
for YouTube bot-detection — wrapper's Android side hasn't registered
a real provider yet, but the trait + global slot stay so when YT
forces po_token universally the integration is one Kotlin patch away,
not a Rust-side rewrite.

~580 LOC removed from production. Wrapper does not need to change.
This commit is contained in:
Sulkta 2026-05-26 22:16:11 -07:00
parent 0c75d64707
commit 12b8865929
13 changed files with 27 additions and 760 deletions

View file

@ -1,7 +1,6 @@
// YouTube service tree. Phase 2 landed the JS deobfuscator. Phase 3 adds
// the InnerTube client matrix, request envelope, parsing helpers, and the
// itag table. Phase 4+ will add the stream extractor, search, channel,
// playlist, kiosks.
// YouTube service tree: JS deobfuscator, the InnerTube client matrix +
// request envelope, parsing helpers, itag table, and the stream / search
// / channel extractors.
pub mod channel;
pub mod client_request;
@ -10,10 +9,14 @@ pub mod itag;
pub mod js;
pub mod linkhandler;
pub mod parsing;
pub mod playlist_extractor;
/// PoToken bot-detection hook. `stream_extractor` reads the global
/// provider via `po_token_provider()`; the Android side hasn't
/// registered a real provider yet, so streams currently flow without
/// a po_token (works until YT requires one universally). This module
/// is the designed extension point — do not delete just because the
/// provider is currently no-op.
pub mod potoken;
pub mod search_extractor;
pub mod stream_extractor;
pub mod stream_helper;
pub mod suggestion_extractor;