aboutsummaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-08-04 22:07:14 +0200
committermetamuffin <metamuffin@disroot.org>2023-08-04 22:07:14 +0200
commit0a2f1d909aed3c807a30589aeca17f81c694dd37 (patch)
tree8684daa06b5c9a48636de9828d63ceae379b694f /import
parentc3ff3320e0ba0085ada9603c3eeb7e557f037677 (diff)
downloadjellything-0a2f1d909aed3c807a30589aeca17f81c694dd37.tar
jellything-0a2f1d909aed3c807a30589aeca17f81c694dd37.tar.bz2
jellything-0a2f1d909aed3c807a30589aeca17f81c694dd37.tar.zst
show view count and likes
Diffstat (limited to 'import')
-rw-r--r--import/src/infojson.rs4
-rw-r--r--import/src/main.rs4
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('-'),
_ => (),
}
}