aboutsummaryrefslogtreecommitdiff
path: root/import/src/infojson.rs
diff options
context:
space:
mode:
Diffstat (limited to 'import/src/infojson.rs')
-rw-r--r--import/src/infojson.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/import/src/infojson.rs b/import/src/infojson.rs
index c2ae305..3e4667e 100644
--- a/import/src/infojson.rs
+++ b/import/src/infojson.rs
@@ -3,13 +3,13 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2025 metamuffin <metamuffin.org>
*/
-
use anyhow::Context;
+use bincode::{Decode, Encode};
use jellycommon::chrono::{format::Parsed, Utc};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
pub struct YVideo {
pub id: String,
pub title: String,
@@ -63,7 +63,7 @@ pub struct YVideo {
pub epoch: usize,
}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
pub struct YCaption {
pub url: Option<String>,
pub ext: String, //"vtt" | "json3" | "srv1" | "srv2" | "srv3" | "ttml",
@@ -71,7 +71,7 @@ pub struct YCaption {
pub name: Option<String>,
}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
pub struct YFormat {
pub format_id: String,
pub format_note: Option<String>,
@@ -96,13 +96,13 @@ pub struct YFormat {
pub format: String,
}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
pub struct YFragment {
pub url: Option<String>,
pub duration: Option<f64>,
}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
pub struct YThumbnail {
pub url: String,
pub preference: Option<i32>,
@@ -112,14 +112,14 @@ pub struct YThumbnail {
pub resolution: Option<String>,
}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
pub struct YChapter {
pub start_time: f64,
pub end_time: f64,
pub title: String,
}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
pub struct YHeatmapSample {
pub start_time: f64,
pub end_time: f64,