From a87454466800e5f360b6ea0c9ee9bec4ae2d2ce7 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 29 Oct 2024 17:33:44 +0100 Subject: chore(yt_dlp/wrapper/info_json): Add further structure fields --- crates/yt_dlp/src/wrapper/info_json.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'crates/yt_dlp/src') diff --git a/crates/yt_dlp/src/wrapper/info_json.rs b/crates/yt_dlp/src/wrapper/info_json.rs index f113fe5..1920172 100644 --- a/crates/yt_dlp/src/wrapper/info_json.rs +++ b/crates/yt_dlp/src/wrapper/info_json.rs @@ -225,19 +225,29 @@ pub enum SubtitleExt { Srv3, } -#[derive(Debug, Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Debug, Deserialize, Serialize, PartialEq, PartialOrd)] #[serde(deny_unknown_fields)] pub struct Caption { pub ext: SubtitleExt, + pub filepath: Option, + pub filesize: Option, + pub fragments: Option>, + pub fragment_base_url: Option, + pub manifest_url: Option, pub name: Option, pub protocol: Option, pub url: String, - pub filepath: Option, pub video_id: Option, - pub manifest_url: Option, - pub filesize: Option, } +#[derive(Debug, Deserialize, Serialize, PartialEq, PartialOrd)] +#[serde(deny_unknown_fields)] +pub struct SubtitleFragment { + path: PathBuf, + duration: Option, +} + + #[derive(Debug, Deserialize, Serialize, PartialEq, PartialOrd)] #[serde(deny_unknown_fields)] pub struct Chapter { -- cgit 1.4.1