feat: extract player DRM data

This commit is contained in:
ThetaDev 2025-01-12 23:41:55 +01:00
parent 2b2b4af0b2
commit 2af4001c75
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
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)
}