From 016e1d8d760113a64afcc5d516f08010cb566d68 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Sun, 21 May 2023 13:43:52 +0200 Subject: added multithreaded downloads and progressbar --- src/commands/modification.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/commands/modification.rs') 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) -> let mut ids = vec![]; + println!("{:?}", mod_ids); + for id in mod_ids { setmap.insert(id.0.to_string(), id.1); ids.push(id.0); @@ -195,14 +197,16 @@ async fn get_mod_infos(config: Cfg, mod_ids: Vec<(String, bool)>, list: List) -> available_versions_vec.push(ver.id); } + println!("{:?}", setmap); + projectinfo.push(ProjectInfo { mod_id: String::from(&project.id), - slug: project.slug, + slug: project.slug.clone(), title: project.title, current_version, applicable_versions: available_versions_vec, download_link: file, - set_version: setmap.get(&project.id).unwrap().clone(), + set_version: setmap.get(&project.slug).unwrap().clone(), }) } else { println!("\t â””There's currently no mod version for your specified target"); -- cgit v1.2.3