diff options
Diffstat (limited to 'import/src')
-rw-r--r-- | import/src/infojson.rs | 4 | ||||
-rw-r--r-- | import/src/main.rs | 4 |
2 files changed, 4 insertions, 4 deletions
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<String, Vec<YCaption>>, pub comment_count: usize, - pub chapters: Vec<YChapter>, - pub heatmap: Vec<YHeatmapSample>, + pub chapters: Option<Vec<YChapter>>, + pub heatmap: Option<Vec<YHeatmapSample>>, 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('-'), _ => (), } } |