Updated the ytmusic cookies situation

This commit is contained in:
Connor Johnstone
2026-03-20 13:38:49 -04:00
parent c8e78606b1
commit fed86c9e85
10 changed files with 722 additions and 15 deletions

View File

@@ -160,6 +160,24 @@ pub struct TrackResult {
pub score: u8,
}
// --- YouTube Auth ---
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct YtAuthStatus {
pub authenticated: bool,
pub cookie_age_hours: Option<f64>,
pub cookie_count: Option<i64>,
pub refresh_enabled: bool,
pub login_session_active: bool,
pub vnc_url: Option<String>,
#[serde(default)]
pub ytdlp_version: Option<String>,
#[serde(default)]
pub ytdlp_latest: Option<String>,
#[serde(default)]
pub ytdlp_update_available: bool,
}
// --- Downloads ---
#[derive(Debug, Clone, PartialEq, Deserialize)]
@@ -303,6 +321,19 @@ pub struct DownloadConfigFe {
pub rate_limit: u32,
#[serde(default)]
pub rate_limit_auth: u32,
#[serde(default)]
pub cookie_refresh_enabled: bool,
#[serde(default = "default_cookie_refresh_hours")]
pub cookie_refresh_hours: u32,
#[serde(default = "default_vnc_port")]
pub vnc_port: u16,
}
fn default_cookie_refresh_hours() -> u32 {
6
}
fn default_vnc_port() -> u16 {
6080
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]