diff options
author | fx <[email protected]> | 2023-05-13 17:28:00 +0200 |
---|---|---|
committer | fx <[email protected]> | 2023-05-13 17:28:00 +0200 |
commit | 5a2ea0755b29a8811aeeec1c73679c5783082628 (patch) | |
tree | db2aaedda9678465763993eeec15bd20673394e8 /src/main.rs | |
parent | 9063a041f6b2e72f6e4a861c77ac16065dd5378b (diff) | |
parent | 3b9d717ecd61bd2b5c32ec117f38c7d67a109748 (diff) | |
download | modlist-5a2ea0755b29a8811aeeec1c73679c5783082628.tar modlist-5a2ea0755b29a8811aeeec1c73679c5783082628.tar.gz modlist-5a2ea0755b29a8811aeeec1c73679c5783082628.zip |
Merge pull request 'todos' (#5) from todos into master
Reviewed-on: http://raspberrypi.fritz.box:7920/fx/modlist/pulls/5
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 2db304b..31a320b 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -3,10 +3,9 @@ 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, VersionLevel, | 6 | mod_add, mod_remove, update, IDSelector, List, Modloader, VersionLevel, list_list, AddMod, |
7 | }; | 7 | }; |
8 | 8 | ||
9 | //TODO make default list optional | ||
10 | #[derive(Parser)] | 9 | #[derive(Parser)] |
11 | #[command(author, version, about)] | 10 | #[command(author, version, about)] |
12 | struct Cli { | 11 | struct Cli { |
@@ -185,7 +184,9 @@ async fn main() { | |||
185 | false => IDSelector::ModificationID(id), | 184 | false => IDSelector::ModificationID(id), |
186 | }; | 185 | }; |
187 | 186 | ||
188 | mod_add(config, vec![marked_id], listf, download, lock).await | 187 | let add_id = AddMod { id: marked_id, set_version: lock }; |
188 | |||
189 | mod_add(config, vec![add_id], listf, download).await | ||
189 | } | 190 | } |
190 | ModCommands::Remove { id, list } => { | 191 | ModCommands::Remove { id, list } => { |
191 | let listf = match list { | 192 | let listf = match list { |
@@ -223,7 +224,7 @@ async fn main() { | |||
223 | } | 224 | } |
224 | ListCommands::Remove { id } => list_remove(config, id), | 225 | ListCommands::Remove { id } => list_remove(config, id), |
225 | ListCommands::List => { | 226 | ListCommands::List => { |
226 | todo!() | 227 | list_list(config) |
227 | } | 228 | } |
228 | ListCommands::Change { id } => list_change(config, id), | 229 | ListCommands::Change { id } => list_change(config, id), |
229 | ListCommands::Version { | 230 | ListCommands::Version { |