From 02bbb2741f2c463aadf9d07493ebaeac1d73c11a Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 30 Jan 2025 14:39:20 +0100 Subject: import channel and children --- import/src/infojson.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'import/src/infojson.rs') 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 */ - 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, pub ext: String, //"vtt" | "json3" | "srv1" | "srv2" | "srv3" | "ttml", @@ -71,7 +71,7 @@ pub struct YCaption { pub name: Option, } -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] pub struct YFormat { pub format_id: String, pub format_note: Option, @@ -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, pub duration: Option, } -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] pub struct YThumbnail { pub url: String, pub preference: Option, @@ -112,14 +112,14 @@ pub struct YThumbnail { pub resolution: Option, } -#[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, -- cgit v1.2.3-70-g09d2