summaryrefslogtreecommitdiff
path: root/src/commands/download.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/download.rs')
-rw-r--r--src/commands/download.rs8
1 files changed, 7 insertions, 1 deletions
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 @@
1 1
2use indicatif::MultiProgress;
3
2use crate::{config::Cfg, List}; 4use crate::{config::Cfg, List};
3use crate::{ 5use crate::{
4 db::userlist_get_all_current_versions_with_mods, 6 db::userlist_get_all_current_versions_with_mods,
@@ -10,10 +12,12 @@ use crate::{
10}; 12};
11 13
12pub async fn download(config: &Cfg, liststack: Vec<List>, clean: bool, delete_old: bool) -> MLE<()> { 14pub async fn download(config: &Cfg, liststack: Vec<List>, clean: bool, delete_old: bool) -> MLE<()> {
15
16 let mp = MultiProgress::new();
17
13 for current_list in liststack { 18 for current_list in liststack {
14 println!("Downloading current versions of mods in {}", current_list.id); 19 println!("Downloading current versions of mods in {}", current_list.id);
15 let downloaded_versions = get_downloaded_versions(current_list.clone())?; 20 let downloaded_versions = get_downloaded_versions(current_list.clone())?;
16 // println!("To download: {:#?}", downloaded_versions);
17 let current_version_ids = match userlist_get_all_current_versions_with_mods( 21 let current_version_ids = match userlist_get_all_current_versions_with_mods(
18 config, 22 config,
19 String::from(&current_list.id), 23 String::from(&current_list.id),
@@ -54,6 +58,8 @@ pub async fn download(config: &Cfg, liststack: Vec<List>, clean: bool, delete_ol
54 current_list.clone(), 58 current_list.clone(),
55 config.clone(), 59 config.clone(),
56 get_raw_versions(&config.apis.modrinth, to_download).await, 60 get_raw_versions(&config.apis.modrinth, to_download).await,
61 &mp,
62 None
57 ) 63 )
58 .await?; 64 .await?;
59 } else { 65 } else {