32 lines
940 B
Rust
32 lines
940 B
Rust
use crate::video_quality::VideoDownloadQuality;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize, Deserialize, Default)]
|
|
pub(crate) struct Video {
|
|
pub(crate) meta_data: MetaData,
|
|
pub(crate) video_path: String,
|
|
pub(crate) video_quality: VideoDownloadQuality,
|
|
pub(crate) downloaded: bool,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Default)]
|
|
pub(crate) struct MetaData {
|
|
pub(crate) title: String,
|
|
pub(crate) author: String,
|
|
pub(crate) description: String,
|
|
pub(crate) original_url: String,
|
|
pub(crate) has_thumbnail: bool,
|
|
pub(crate) thumbnail_path: String,
|
|
pub(crate) thumbnail_path_low_quality: String,
|
|
pub(crate) downloaded: bool,
|
|
pub(crate) date_downloaded: String,
|
|
pub(crate) date_published: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Default)]
|
|
pub(crate) struct Playlist {
|
|
pub(crate) meta_data: MetaData,
|
|
pub(crate) videos: Vec<Video>,
|
|
pub(crate) num_videos: usize,
|
|
}
|