diff options
author | fxqnlr <[email protected]> | 2023-05-03 08:29:31 +0200 |
---|---|---|
committer | fxqnlr <[email protected]> | 2023-05-03 08:29:31 +0200 |
commit | 87947ce38476e7a5fb8d4db1bc9e0b584aa965ca (patch) | |
tree | cc6a289d573faf83cfbd23d7a66bc2c9066b767d /src/main.rs | |
parent | 245b6b9926033acd750503ab4947c9514c5e1aa6 (diff) | |
download | modlist-87947ce38476e7a5fb8d4db1bc9e0b584aa965ca.tar modlist-87947ce38476e7a5fb8d4db1bc9e0b584aa965ca.tar.gz modlist-87947ce38476e7a5fb8d4db1bc9e0b584aa965ca.zip |
added async trait? WHY
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 93da718..b12e3e4 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -3,7 +3,7 @@ use modlist::{ | |||
3 | config::Cfg, | 3 | config::Cfg, |
4 | db::{config_get_current_list, lists_get, lists_get_all_ids}, | 4 | db::{config_get_current_list, lists_get, lists_get_all_ids}, |
5 | download, export, get_current_list, import, list_add, list_change, list_remove, list_version, | 5 | download, export, get_current_list, import, list_add, list_change, list_remove, list_version, |
6 | mod_add, mod_remove, update, IDSelector, List, Modloader, check_game_versions, VersionLevel, | 6 | mod_add, mod_remove, update, IDSelector, List, Modloader, VersionLevel, |
7 | }; | 7 | }; |
8 | 8 | ||
9 | //TODO implement remote sql db | 9 | //TODO implement remote sql db |
@@ -153,7 +153,6 @@ async fn main() { | |||
153 | let cli = Cli::parse(); | 153 | let cli = Cli::parse(); |
154 | 154 | ||
155 | let config = Cfg::init(cli.config).await.unwrap(); | 155 | let config = Cfg::init(cli.config).await.unwrap(); |
156 | check_game_versions(format!("{}/versions.json", config.versions).as_str(), cli.force_gameupdate).await.unwrap(); | ||
157 | 156 | ||
158 | match cli.command { | 157 | match cli.command { |
159 | Commands::Mod { command } => { | 158 | Commands::Mod { command } => { |
@@ -212,8 +211,8 @@ async fn main() { | |||
212 | 211 | ||
213 | let versions_path = &config.versions; | 212 | let versions_path = &config.versions; |
214 | let ver = match version { | 213 | let ver = match version { |
215 | Some(ver) => VersionLevel::from(&ver).get(versions_path).unwrap(), | 214 | Some(ver) => VersionLevel::from(&ver).get(versions_path, cli.force_gameupdate).await.unwrap(), |
216 | None => config.clone().defaults.version.get(versions_path).unwrap(), | 215 | None => config.clone().defaults.version.get(versions_path, cli.force_gameupdate).await.unwrap(), |
217 | }; | 216 | }; |
218 | 217 | ||
219 | list_add(config, id, ver, ml, directory) | 218 | list_add(config, id, ver, ml, directory) |