From ff23a11e632812b685f594324e6004c6da81cd4d Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Sun, 5 Feb 2023 09:23:29 +0100 Subject: Fixed update shit not correctly updating --- src/files.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/files.rs') diff --git a/src/files.rs b/src/files.rs index 8c822b2..b9325ea 100644 --- a/src/files.rs +++ b/src/files.rs @@ -2,17 +2,17 @@ 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_name}, config::Cfg, error::{MLE, MLError, ErrorType}}; +use crate::{List, modrinth::Version, db::{userlist_add_disabled_versions, mods_get_title}, config::Cfg, error::{MLE, MLError, ErrorType}}; pub async fn download_versions(list: List, config: Cfg, versions: Vec) -> MLE { let dl_path = String::from(&list.download_folder); - println!("Download to directory from: {} ({})", list.id, dl_path); + println!(" └Download mods to {}", dl_path); for ver in versions { - let project_name = mods_get_name(config.clone(), &ver.project_id)?; - print!("\t({})Download version {}", project_name, ver.id); + let project_name = mods_get_title(config.clone(), &ver.project_id)?; + print!("\t└({})Download version {}", project_name, 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(); @@ -107,7 +107,7 @@ pub fn get_downloaded_versions(list: List) -> MLE> { pub fn clean_list_dir(list: &List) -> MLE<()> { let dl_path = &list.download_folder; - println!("Clean directory for: {}", list.id); + println!(" └Clean directory for: {}", list.id); for entry in std::fs::read_dir(dl_path)? { let entry = entry?; std::fs::remove_file(entry.path())?; -- cgit v1.2.3