aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-12-17 20:58:10 +0100
committermetamuffin <metamuffin@disroot.org>2023-12-17 20:58:10 +0100
commit2a26a6030e25127a3967dd5bccba1fb05d485ab1 (patch)
treedb2ecba63bde78804277ec66915dc3b4512a4991 /common/src
parente7155ec05458ed00035ce8bc5c087306cfeedbc1 (diff)
downloadjellything-2a26a6030e25127a3967dd5bccba1fb05d485ab1.tar
jellything-2a26a6030e25127a3967dd5bccba1fb05d485ab1.tar.bz2
jellything-2a26a6030e25127a3967dd5bccba1fb05d485ab1.tar.zst
chapters
Diffstat (limited to 'common/src')
-rw-r--r--common/src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index ea19205..aedcb07 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -110,6 +110,15 @@ pub struct LocalTrack {
pub struct MediaInfo {
pub duration: f64, // in seconds
pub tracks: Vec<SourceTrack>,
+ #[serde(default)]
+ pub chapters: Vec<Chapter>,
+}
+
+#[derive(Debug, Clone, Deserialize, Serialize, Default)]
+pub struct Chapter {
+ pub time_start: Option<f64>,
+ pub time_end: Option<f64>,
+ pub labels: Vec<(String, String)>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]