cli options
This commit is contained in:
parent
9490addc30
commit
d056534b9b
@ -307,6 +307,10 @@ auto main(int argc, char **argv) -> int {
|
||||
fmt::println("\tdisplay configuration");
|
||||
fmt::println("monitarr -l -i <index>");
|
||||
fmt::println("\tdisplay server queue at configuration index");
|
||||
fmt::println("monitarr -b -i <index> -id <record id>");
|
||||
fmt::println("\tblocklist and search record id at configuration index");
|
||||
fmt::println("monitarr -s -i <index> -id <record id>");
|
||||
fmt::println("\tshow record id details at configuration index");
|
||||
} else if (has_arg("-l", argc, argv)) {
|
||||
auto idx = get_arg("-i", argc, argv);
|
||||
if (idx.has_value()) {
|
||||
@ -329,6 +333,19 @@ auto main(int argc, char **argv) -> int {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (has_arg("-s", argc, argv)) {
|
||||
auto idx = get_arg("-i", argc, argv);
|
||||
if (idx.has_value()) {
|
||||
auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
|
||||
auto record_id = get_arg("-id", argc, argv);
|
||||
if (record_id.has_value()) {
|
||||
auto entry =
|
||||
get_download(utils::string::to_uint64(*record_id), server);
|
||||
if (entry.has_value()) {
|
||||
fmt::println("{}", entry->dump(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (const std::exception &ex) {
|
||||
utils::error::handle_exception(function_name, ex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user