From 7f1a262999d7a8b7f12a97daf4b6722638dc62a1 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Thu, 25 May 2023 21:06:40 +0200 Subject: more progress instead of print, more references --- src/commands/download.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/commands/download.rs') diff --git a/src/commands/download.rs b/src/commands/download.rs index fea3f34..e9a96b5 100644 --- a/src/commands/download.rs +++ b/src/commands/download.rs @@ -1,4 +1,6 @@ +use indicatif::MultiProgress; + use crate::{config::Cfg, List}; use crate::{ db::userlist_get_all_current_versions_with_mods, @@ -10,10 +12,12 @@ use crate::{ }; pub async fn download(config: &Cfg, liststack: Vec, clean: bool, delete_old: bool) -> MLE<()> { + + let mp = MultiProgress::new(); + for current_list in liststack { println!("Downloading current versions of mods in {}", current_list.id); let downloaded_versions = get_downloaded_versions(current_list.clone())?; - // println!("To download: {:#?}", downloaded_versions); let current_version_ids = match userlist_get_all_current_versions_with_mods( config, String::from(¤t_list.id), @@ -54,6 +58,8 @@ pub async fn download(config: &Cfg, liststack: Vec, clean: bool, delete_ol current_list.clone(), config.clone(), get_raw_versions(&config.apis.modrinth, to_download).await, + &mp, + None ) .await?; } else { -- cgit v1.2.3