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/commands/update.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/commands/update.rs') diff --git a/src/commands/update.rs b/src/commands/update.rs index bc5b316..75bee39 100644 --- a/src/commands/update.rs +++ b/src/commands/update.rs @@ -1,4 +1,4 @@ -use crate::{config::Cfg, modrinth::{versions, extract_current_version, Version}, get_current_list, db::{userlist_get_all_ids, userlist_get_applicable_versions, userlist_change_versions, lists_get_all_ids, lists_get, userlist_get_current_version, mods_get_title, userlist_get_set_version}, List, input::Input, files::{delete_version, download_versions, disable_version, clean_list_dir}, error::{MLE, MLError, ErrorType}}; +use crate::{config::Cfg, modrinth::{versions, extract_current_version, Version}, get_current_list, db::{userlist_get_all_ids, userlist_get_applicable_versions, userlist_change_versions, lists_get_all_ids, lists_get, userlist_get_current_version, userlist_get_set_version, mods_get_info}, List, input::Input, files::{delete_version, download_versions, disable_version, clean_list_dir}, error::{MLE, MLError, ErrorType}}; pub async fn update(config: Cfg, input: Input) -> MLE<()> { let mut liststack: Vec = vec![]; @@ -25,8 +25,8 @@ pub async fn cmd_update(config: Cfg, liststack: Vec, clean: bool, direct_d let mut updatestack: Vec = vec![]; for id in mods { - let title = mods_get_title(config.clone(), &id)?; - println!("\t└{}", title); + let info = mods_get_info(config.clone(), &id)?; + println!("\t└{}", info.title); if userlist_get_set_version(config.clone(), ¤t_list.id, &id)? { println!("\t └Set version, skipping update"); @@ -78,7 +78,7 @@ pub async fn cmd_update(config: Cfg, liststack: Vec, clean: bool, direct_d } async fn specific_update(config: Cfg, clean: bool, list: List, id: String) -> MLE { - let applicable_versions = versions(String::from(&config.apis.modrinth), String::from(&id), list.clone()).await; + let applicable_versions = versions(&config.apis.modrinth, String::from(&id), list.clone()).await; let mut versions: Vec = vec![]; -- cgit v1.2.3