diff options
Diffstat (limited to 'src/commands/update.rs')
-rw-r--r-- | src/commands/update.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 @@ | |||
1 | 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}}; | 1 | 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}}; |
2 | 2 | ||
3 | pub async fn update(config: Cfg, input: Input) -> MLE<()> { | 3 | pub async fn update(config: Cfg, input: Input) -> MLE<()> { |
4 | let mut liststack: Vec<List> = vec![]; | 4 | let mut liststack: Vec<List> = vec![]; |
@@ -25,8 +25,8 @@ pub async fn cmd_update(config: Cfg, liststack: Vec<List>, clean: bool, direct_d | |||
25 | let mut updatestack: Vec<Version> = vec![]; | 25 | let mut updatestack: Vec<Version> = vec![]; |
26 | 26 | ||
27 | for id in mods { | 27 | for id in mods { |
28 | let title = mods_get_title(config.clone(), &id)?; | 28 | let info = mods_get_info(config.clone(), &id)?; |
29 | println!("\t└{}", title); | 29 | println!("\t└{}", info.title); |
30 | 30 | ||
31 | if userlist_get_set_version(config.clone(), ¤t_list.id, &id)? { | 31 | if userlist_get_set_version(config.clone(), ¤t_list.id, &id)? { |
32 | println!("\t └Set version, skipping update"); | 32 | println!("\t └Set version, skipping update"); |
@@ -78,7 +78,7 @@ pub async fn cmd_update(config: Cfg, liststack: Vec<List>, clean: bool, direct_d | |||
78 | } | 78 | } |
79 | 79 | ||
80 | async fn specific_update(config: Cfg, clean: bool, list: List, id: String) -> MLE<Version> { | 80 | async fn specific_update(config: Cfg, clean: bool, list: List, id: String) -> MLE<Version> { |
81 | let applicable_versions = versions(String::from(&config.apis.modrinth), String::from(&id), list.clone()).await; | 81 | let applicable_versions = versions(&config.apis.modrinth, String::from(&id), list.clone()).await; |
82 | 82 | ||
83 | let mut versions: Vec<String> = vec![]; | 83 | let mut versions: Vec<String> = vec![]; |
84 | 84 | ||