From a0292aa77089308ddeae80ba1ff9dd0a70af015e Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 3 Aug 2025 16:12:58 +0300 Subject: [PATCH] update config api --- src/config.rs | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/config.rs b/src/config.rs index 81c0d52..b92f5f6 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,7 +5,7 @@ use std::path::PathBuf; #[command(version, about, long_about = None)] pub struct Config { /// Path to the permanent [redb](https://www.redb.org) database - #[arg(long)] + #[arg(long, short)] pub database: PathBuf, /// Print debug output @@ -15,21 +15,17 @@ pub struct Config { /// Absolute path(s) or URL(s) to import infohashes from the Aquatic tracker binary API /// /// * PR#233 feature ([Wiki](https://github.com/YGGverse/aquatic-crawler/wiki/Aquatic)) - #[arg(long)] + #[arg(long, short)] pub infohash: Vec, /// Define custom tracker(s) to preload the `.torrent` files info - #[arg(long)] + #[arg(long, short)] pub tracker: Vec, /// Define initial peer(s) to preload the `.torrent` files info #[arg(long)] pub initial_peer: Vec, - /// Save resolved torrent files to given directory - #[arg(long)] - pub export_torrents: Option, - /// Appends `--tracker` value to magnets and torrents #[arg(long, default_value_t = false)] pub export_trackers: bool, @@ -42,15 +38,8 @@ pub struct Config { #[arg(long)] pub bind: Option, - /// Bind listener on specified `host:port` (`[host]:port` for IPv6) - /// - /// * this option is useful only for binding the data exchange service, - /// to restrict the outgoing connections for torrent resolver, use `bind` option instead - #[arg(long)] - pub listen: Option, - /// Directory path to store temporary preload data - #[arg(long)] + #[arg(long, short)] pub preload: PathBuf, /// Max size sum of preloaded files per torrent (match `preload_regex`)