aboutsummaryrefslogtreecommitdiffstats
path: root/crates/yt_dlp/src/wrapper
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-29 17:33:44 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-29 17:33:44 +0100
commita87454466800e5f360b6ea0c9ee9bec4ae2d2ce7 (patch)
tree2880fc88d77556b2fe6db07385fc79533974935c /crates/yt_dlp/src/wrapper
parentfix(yt/watch): Refine the warning on empty queue (diff)
downloadyt-a87454466800e5f360b6ea0c9ee9bec4ae2d2ce7.zip
chore(yt_dlp/wrapper/info_json): Add further structure fields
Diffstat (limited to 'crates/yt_dlp/src/wrapper')
-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,