summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2023-05-21 13:43:52 +0200
committerfxqnlr <[email protected]>2023-05-21 13:43:52 +0200
commit016e1d8d760113a64afcc5d516f08010cb566d68 (patch)
tree3de1a3bfbd3c7266dab5288240720133ffd2f602 /src/commands
parent5a2ea0755b29a8811aeeec1c73679c5783082628 (diff)
downloadmodlist-016e1d8d760113a64afcc5d516f08010cb566d68.tar
modlist-016e1d8d760113a64afcc5d516f08010cb566d68.tar.gz
modlist-016e1d8d760113a64afcc5d516f08010cb566d68.zip
added multithreaded downloads and progressbar
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/modification.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/commands/modification.rs b/src/commands/modification.rs
index 9a1a651..d4c49d6 100644
--- a/src/commands/modification.rs
+++ b/src/commands/modification.rs
@@ -140,6 +140,8 @@ async fn get_mod_infos(config: Cfg, mod_ids: Vec<(String, bool)>, list: List) ->
140 140
141 let mut ids = vec![]; 141 let mut ids = vec![];
142 142
143 println!("{:?}", mod_ids);
144
143 for id in mod_ids { 145 for id in mod_ids {
144 setmap.insert(id.0.to_string(), id.1); 146 setmap.insert(id.0.to_string(), id.1);
145 ids.push(id.0); 147 ids.push(id.0);
@@ -195,14 +197,16 @@ async fn get_mod_infos(config: Cfg, mod_ids: Vec<(String, bool)>, list: List) ->
195 available_versions_vec.push(ver.id); 197 available_versions_vec.push(ver.id);
196 } 198 }
197 199
200 println!("{:?}", setmap);
201
198 projectinfo.push(ProjectInfo { 202 projectinfo.push(ProjectInfo {
199 mod_id: String::from(&project.id), 203 mod_id: String::from(&project.id),
200 slug: project.slug, 204 slug: project.slug.clone(),
201 title: project.title, 205 title: project.title,
202 current_version, 206 current_version,
203 applicable_versions: available_versions_vec, 207 applicable_versions: available_versions_vec,
204 download_link: file, 208 download_link: file,
205 set_version: setmap.get(&project.id).unwrap().clone(), 209 set_version: setmap.get(&project.slug).unwrap().clone(),
206 }) 210 })
207 } else { 211 } else {
208 println!("\t └There's currently no mod version for your specified target"); 212 println!("\t └There's currently no mod version for your specified target");