aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/src')
-rw-r--r--common/src/lib.rs39
1 files changed, 39 insertions, 0 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
new file mode 100644
index 0000000..6c8bceb
--- /dev/null
+++ b/common/src/lib.rs
@@ -0,0 +1,39 @@
+use std::{collections::BTreeMap, path::PathBuf};
+
+use serde::{Deserialize, Serialize};
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct DirectoryInfo {
+ pub name: String,
+}
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct ItemInfo {
+ pub title: String,
+ pub source: Vec<Source>,
+}
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct Source {
+ file: PathBuf,
+ tracks: BTreeMap<u64, SourceTrack>,
+}
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub enum SourceTrack {
+ Video {
+ name: String,
+ codec: String,
+ width: usize,
+ height: usize,
+ },
+ Audio {
+ channels: usize,
+ codec: String,
+ sample_rate: f64,
+ language: String,
+ },
+ Subtitles {
+ language: String,
+ },
+}