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,8 +1,8 @@
// ClientsConstants — mirrors NPE services/youtube/ClientsConstants.java.
//
// Six live InnerTube clients: WEB, WEB_EMBEDDED_PLAYER, WEB_MUSIC_ANALYTICS,
// WEB_REMIX, ANDROID, IOS. NPE's tree also mentions TVHTML5 + MWEB in
// comments — not actively used; skipped per audit Track A §1.3.
// InnerTube client constants. Active clients: WEB, WEB_EMBEDDED_PLAYER,
// ANDROID, IOS. WEB_REMIX (music) and WEB_MUSIC_ANALYTICS were ported
// but never wired through — dropped 2026-05-26 along with the music
// SearchFilter variants and the of_web_music_analytics_charts_client
// factory.
pub const DESKTOP_CLIENT_PLATFORM: &str = "DESKTOP";
pub const MOBILE_CLIENT_PLATFORM: &str = "MOBILE";
@ -13,18 +13,10 @@ pub const WEB_CLIENT_ID: &str = "1";
pub const WEB_CLIENT_NAME: &str = "WEB";
pub const WEB_HARDCODED_CLIENT_VERSION: &str = "2.20260120.01.00";
pub const WEB_REMIX_CLIENT_ID: &str = "67";
pub const WEB_REMIX_CLIENT_NAME: &str = "WEB_REMIX";
pub const WEB_REMIX_HARDCODED_CLIENT_VERSION: &str = "1.20260121.03.00";
pub const WEB_EMBEDDED_CLIENT_ID: &str = "56";
pub const WEB_EMBEDDED_CLIENT_NAME: &str = "WEB_EMBEDDED_PLAYER";
pub const WEB_EMBEDDED_CLIENT_VERSION: &str = "1.20260122.01.00";
pub const WEB_MUSIC_ANALYTICS_CLIENT_ID: &str = "31";
pub const WEB_MUSIC_ANALYTICS_CLIENT_NAME: &str = "WEB_MUSIC_ANALYTICS";
pub const WEB_MUSIC_ANALYTICS_CLIENT_VERSION: &str = "2.0";
// iPhone 15 Pro Max — chosen explicitly for 60fps tags per ItagItem.java:26
// note and the gist referenced in NPE source.
pub const IOS_CLIENT_ID: &str = "5";