add yt-dlp json struct deserializers
This commit is contained in:
parent
045921bcd9
commit
e935caefdc
1 changed files with 31 additions and 0 deletions
|
|
@ -1 +1,32 @@
|
||||||
|
use serde::Deserialize;
|
||||||
|
use serde_json;
|
||||||
|
use std::process::Command;
|
||||||
|
|
||||||
|
#[derive(Deserialize, Debug)]
|
||||||
|
pub struct YtDlpFormat {
|
||||||
|
pub format_id: String,
|
||||||
|
pub format_note: Option<String>,
|
||||||
|
pub audio_channels: Option<u8>,
|
||||||
|
pub width: Option<u16>,
|
||||||
|
pub height: Option<u16>,
|
||||||
|
pub ext: String,
|
||||||
|
pub vcodec: Option<String>,
|
||||||
|
pub acodec: Option<String>,
|
||||||
|
pub abr: Option<f32>,
|
||||||
|
pub vbr: Option<f32>
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, Debug)]
|
||||||
|
pub struct YtDlpInfo {
|
||||||
|
pub id: String,
|
||||||
|
pub title: String,
|
||||||
|
pub formats: Vec<YtDlpFormat>
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct YtDlp {}
|
||||||
|
|
||||||
|
impl YtDlp {
|
||||||
|
pub fn load_info(url: &str) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue