diff options
-rw-r--r-- | src/character.rs | 7 | ||||
-rw-r--r-- | src/main.rs | 2 |
2 files changed, 6 insertions, 3 deletions
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 { | |||
85 | let name: &Section = §ions["name".into()]; | 85 | let name: &Section = §ions["name".into()]; |
86 | let image: &Section = §ions["image".into()]; | 86 | let image: &Section = §ions["image".into()]; |
87 | let misc: &Section = §ions["misc".into()]; | 87 | let misc: &Section = §ions["misc".into()]; |
88 | 88 | let tags: &Section = §ions["tags".into()]; | |
89 | |||
89 | self.name.romaji = name.data["romaji".into()].clone(); | 90 | self.name.romaji = name.data["romaji".into()].clone(); |
90 | self.name.japanese = name.data["japanese".into()].clone(); | 91 | self.name.japanese = name.data["japanese".into()].clone(); |
91 | 92 | ||
@@ -96,7 +97,9 @@ impl Character { | |||
96 | self.image.thumb = image.data["thumb".into()].clone(); | 97 | self.image.thumb = image.data["thumb".into()].clone(); |
97 | self.image.full = image.data["full".into()].clone(); | 98 | self.image.full = image.data["full".into()].clone(); |
98 | 99 | ||
99 | self.tags = tags::parse(&(§ions["tags".into()] as &Section).data["tags_raw".into()]); | 100 | if tags.data.contains_key("tags_raw".into()) { |
101 | self.tags = tags::parse(&tags.data["tags_raw".into()]); | ||
102 | } | ||
100 | 103 | ||
101 | self.traits.official = dl_list::parse(&(§ions["traits"] as &Section).data["official_raw".into()]); | 104 | self.traits.official = dl_list::parse(&(§ions["traits"] as &Section).data["official_raw".into()]); |
102 | self.traits.indexed = dl_list::parse(&(§ions["traits"] as &Section).data["indexed_raw".into()]); | 105 | 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() { | |||
39 | 39 | ||
40 | let files: Arc<Mutex<Vec<DirEntry>>> = Arc::new(Mutex::new(WalkDir::new(base_path).min_depth(1).into_iter().filter_map(|e| e.ok()).collect())); | 40 | let files: Arc<Mutex<Vec<DirEntry>>> = Arc::new(Mutex::new(WalkDir::new(base_path).min_depth(1).into_iter().filter_map(|e| e.ok()).collect())); |
41 | 41 | ||
42 | for i in 1..MAX_THREADS { | 42 | for i in 0..MAX_THREADS { |
43 | let files = files.clone(); | 43 | let files = files.clone(); |
44 | let out_files = out_files.clone(); | 44 | let out_files = out_files.clone(); |
45 | active_threads.fetch_add(1, Ordering::SeqCst); | 45 | active_threads.fetch_add(1, Ordering::SeqCst); |