From b8b1da0a95635fe9ed4ba28851906556ccc351a8 Mon Sep 17 00:00:00 2001 From: jan Date: Sat, 1 Oct 2016 20:00:20 +0200 Subject: fertig. diff --git a/src/character.rs b/src/character.rs index 489588e..0630a45 100644 --- a/src/character.rs +++ b/src/character.rs @@ -85,7 +85,8 @@ impl Character { let name: &Section = §ions["name".into()]; let image: &Section = §ions["image".into()]; let misc: &Section = §ions["misc".into()]; - + let tags: &Section = §ions["tags".into()]; + self.name.romaji = name.data["romaji".into()].clone(); self.name.japanese = name.data["japanese".into()].clone(); @@ -96,7 +97,9 @@ impl Character { self.image.thumb = image.data["thumb".into()].clone(); self.image.full = image.data["full".into()].clone(); - self.tags = tags::parse(&(§ions["tags".into()] as &Section).data["tags_raw".into()]); + if tags.data.contains_key("tags_raw".into()) { + self.tags = tags::parse(&tags.data["tags_raw".into()]); + } self.traits.official = dl_list::parse(&(§ions["traits"] as &Section).data["official_raw".into()]); self.traits.indexed = dl_list::parse(&(§ions["traits"] as &Section).data["indexed_raw".into()]); diff --git a/src/main.rs b/src/main.rs index 8a3787b..2b96024 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,7 @@ fn main() { let files: Arc>> = Arc::new(Mutex::new(WalkDir::new(base_path).min_depth(1).into_iter().filter_map(|e| e.ok()).collect())); - for i in 1..MAX_THREADS { + for i in 0..MAX_THREADS { let files = files.clone(); let out_files = out_files.clone(); active_threads.fetch_add(1, Ordering::SeqCst); -- cgit v0.10.1