From 0a2f1d909aed3c807a30589aeca17f81c694dd37 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 4 Aug 2023 22:07:14 +0200 Subject: show view count and likes --- import/src/infojson.rs | 4 ++-- import/src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'import/src') diff --git a/import/src/infojson.rs b/import/src/infojson.rs index 0ed496c..d9d60ed 100644 --- a/import/src/infojson.rs +++ b/import/src/infojson.rs @@ -26,8 +26,8 @@ pub struct YVideo { pub playable_in_embed: bool, pub automatic_captions: HashMap>, pub comment_count: usize, - pub chapters: Vec, - pub heatmap: Vec, + pub chapters: Option>, + pub heatmap: Option>, pub like_count: usize, pub channel: String, pub channel_follower_count: usize, diff --git a/import/src/main.rs b/import/src/main.rs index 71c3c1e..29d1e21 100644 --- a/import/src/main.rs +++ b/import/src/main.rs @@ -309,9 +309,9 @@ fn make_ident(s: &str) -> String { let mut out = String::new(); for s in s.chars() { match s { - 'a'..='z' => out.push(s), + 'a'..='z' | '0'..='9' => out.push(s), 'A'..='Z' => out.push(s.to_ascii_lowercase()), - '-' | ' ' | '_' => out.push('-'), + '-' | ' ' | '_' | ':' => out.push('-'), _ => (), } } -- cgit v1.2.3-70-g09d2