diff options
Diffstat (limited to 'src/files.rs')
-rw-r--r-- | src/files.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/files.rs b/src/files.rs index b9325ea..6519c6a 100644 --- a/src/files.rs +++ b/src/files.rs | |||
@@ -2,7 +2,7 @@ use std::{fs::{File, read_dir, remove_file, rename}, io::Write, collections::Has | |||
2 | use futures_util::StreamExt; | 2 | use futures_util::StreamExt; |
3 | use reqwest::Client; | 3 | use reqwest::Client; |
4 | 4 | ||
5 | use crate::{List, modrinth::Version, db::{userlist_add_disabled_versions, mods_get_title}, config::Cfg, error::{MLE, MLError, ErrorType}}; | 5 | use crate::{List, modrinth::Version, db::{userlist_add_disabled_versions, mods_get_info}, config::Cfg, error::{MLE, MLError, ErrorType}}; |
6 | 6 | ||
7 | pub async fn download_versions(list: List, config: Cfg, versions: Vec<Version>) -> MLE<String> { | 7 | pub async fn download_versions(list: List, config: Cfg, versions: Vec<Version>) -> MLE<String> { |
8 | 8 | ||
@@ -11,8 +11,8 @@ pub async fn download_versions(list: List, config: Cfg, versions: Vec<Version>) | |||
11 | println!(" └Download mods to {}", dl_path); | 11 | println!(" └Download mods to {}", dl_path); |
12 | 12 | ||
13 | for ver in versions { | 13 | for ver in versions { |
14 | let project_name = mods_get_title(config.clone(), &ver.project_id)?; | 14 | let project_info = mods_get_info(config.clone(), &ver.project_id)?; |
15 | print!("\t└({})Download version {}", project_name, ver.id); | 15 | print!("\t└({})Download version {}", project_info.title, ver.id); |
16 | //Force flush of stdout, else print! doesn't print instantly | 16 | //Force flush of stdout, else print! doesn't print instantly |
17 | std::io::stdout().flush().unwrap(); | 17 | std::io::stdout().flush().unwrap(); |
18 | let primary_file = ver.files.into_iter().find(|file| file.primary).unwrap(); | 18 | let primary_file = ver.files.into_iter().find(|file| file.primary).unwrap(); |