use json::JsonValue; use serde::Serialize; use std::{ collections::{hash_map::DefaultHasher, HashMap}, hash::{Hash, Hasher}, path::PathBuf, process::Stdio, str::{self, FromStr}, }; use tokio::process::Command; use utoipa::ToSchema; use crate::transcode::Quality; #[derive(Serialize, ToSchema)] #[serde(rename_all = "camelCase")] pub struct MediaInfo { /// The sha1 of the video file. pub sha: String, /// The internal path of the video file. pub path: String, /// The length of the media in seconds. pub length: f32, /// The container of the video file of this episode. pub container: String, /// The video codec and infromations. pub video: Video, /// The list of audio tracks. pub audios: Vec