From 9c984cef9a2d0fb223635617934959480e8ca2df Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Sun, 19 Feb 2023 11:49:23 +0100 Subject: Added adding of specific mod-version --- src/files.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/files.rs') 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 use futures_util::StreamExt; use reqwest::Client; -use crate::{List, modrinth::Version, db::{userlist_add_disabled_versions, mods_get_title}, config::Cfg, error::{MLE, MLError, ErrorType}}; +use crate::{List, modrinth::Version, db::{userlist_add_disabled_versions, mods_get_info}, config::Cfg, error::{MLE, MLError, ErrorType}}; pub async fn download_versions(list: List, config: Cfg, versions: Vec) -> MLE { @@ -11,8 +11,8 @@ pub async fn download_versions(list: List, config: Cfg, versions: Vec) println!(" └Download mods to {}", dl_path); for ver in versions { - let project_name = mods_get_title(config.clone(), &ver.project_id)?; - print!("\t└({})Download version {}", project_name, ver.id); + let project_info = mods_get_info(config.clone(), &ver.project_id)?; + print!("\t└({})Download version {}", project_info.title, ver.id); //Force flush of stdout, else print! doesn't print instantly std::io::stdout().flush().unwrap(); let primary_file = ver.files.into_iter().find(|file| file.primary).unwrap(); -- cgit v1.2.3