about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--crates/yt_dlp/src/wrapper/info_json.rs18
1 files changed, 14 insertions, 4 deletions
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,21 +225,31 @@ 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<PathBuf>,
+    pub filesize: Option<u64>,
+    pub fragments: Option<Vec<SubtitleFragment>>,
+    pub fragment_base_url: Option<Url>,
+    pub manifest_url: Option<Url>,
     pub name: Option<String>,
     pub protocol: Option<String>,
     pub url: String,
-    pub filepath: Option<PathBuf>,
     pub video_id: Option<String>,
-    pub manifest_url: Option<Url>,
-    pub filesize: Option<u64>,
 }
 
 #[derive(Debug, Deserialize, Serialize, PartialEq, PartialOrd)]
 #[serde(deny_unknown_fields)]
+pub struct SubtitleFragment {
+    path: PathBuf,
+    duration: Option<f64>,
+}
+
+
+#[derive(Debug, Deserialize, Serialize, PartialEq, PartialOrd)]
+#[serde(deny_unknown_fields)]
 pub struct Chapter {
     pub end_time: f64,
     pub start_time: f64,