feat: extract player DRM data

This commit is contained in:
ThetaDev 2025-01-12 23:41:55 +01:00
parent 8751ee6a5b
commit 26d9f674d9
15 changed files with 673 additions and 128 deletions

View file

@ -2908,7 +2908,7 @@ fn unlocalized(lang: Language) -> bool {
#[fixture]
fn auth_enabled(rp: RustyPipe) -> bool {
std::env::var("YT_AUTHENTICATED")
.map(|v| !v.is_empty() && v.to_ascii_lowercase() != "false")
.map(|v| !v.is_empty() && !v.eq_ignore_ascii_case("false"))
.unwrap_or_default()
|| rp.query().auth_enabled(ClientType::Desktop)
|| rp.query().auth_enabled(ClientType::Tv)
@ -2918,7 +2918,7 @@ fn auth_enabled(rp: RustyPipe) -> bool {
#[fixture]
fn cookie_auth_enabled(rp: RustyPipe) -> bool {
std::env::var("YT_AUTHENTICATED")
.map(|v| !v.is_empty() && v.to_ascii_lowercase() != "false")
.map(|v| !v.is_empty() && !v.eq_ignore_ascii_case("false"))
.unwrap_or_default()
|| rp.query().auth_enabled(ClientType::Desktop)
}