diff options
author | metamuffin <metamuffin@disroot.org> | 2023-08-04 23:20:21 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-08-04 23:20:21 +0200 |
commit | 2345469bc56f5daba8ced77e49ad58f38b1c5538 (patch) | |
tree | f54a61177580ffc49e7903ccab12cf7cc5354833 /import/src | |
parent | 0a2f1d909aed3c807a30589aeca17f81c694dd37 (diff) | |
download | jellything-2345469bc56f5daba8ced77e49ad58f38b1c5538.tar jellything-2345469bc56f5daba8ced77e49ad58f38b1c5538.tar.bz2 jellything-2345469bc56f5daba8ced77e49ad58f38b1c5538.tar.zst |
fixes, set parent node correctly
Diffstat (limited to 'import/src')
-rw-r--r-- | import/src/infojson.rs | 6 | ||||
-rw-r--r-- | import/src/main.rs | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/import/src/infojson.rs b/import/src/infojson.rs index d9d60ed..e22fd71 100644 --- a/import/src/infojson.rs +++ b/import/src/infojson.rs @@ -31,7 +31,7 @@ pub struct YVideo { pub like_count: usize, pub channel: String, pub channel_follower_count: usize, - pub channel_is_verified: bool, + pub channel_is_verified: Option<bool>, pub uploader: String, pub uploader_id: String, pub uploader_url: String, @@ -60,7 +60,7 @@ pub struct YVideo { #[derive(Debug, Serialize, Deserialize)] pub struct YCaption { - pub url: String, + pub url: Option<String>, pub ext: String, //"vtt" | "json3" | "srv1" | "srv2" | "srv3" | "ttml", pub protocol: Option<String>, pub name: Option<String>, @@ -74,7 +74,7 @@ pub struct YFormat { pub protocol: String, pub acodec: Option<String>, pub vcodec: Option<String>, - pub url: String, + pub url: Option<String>, pub width: Option<u32>, pub height: Option<u32>, pub fps: Option<f64>, diff --git a/import/src/main.rs b/import/src/main.rs index 29d1e21..b55b645 100644 --- a/import/src/main.rs +++ b/import/src/main.rs @@ -275,7 +275,6 @@ fn main() -> anyhow::Result<()> { }; if args.dry { - println!("{}", serde_json::to_string_pretty(&infojson)?); println!("{}", serde_json::to_string_pretty(&node)?); } else { if let Some(source_path) = source_path { |