Disable upload: do not expose in default builds, move under a feature flag.
This commit is contained in:
parent
b99a1e2b73
commit
990c5f866b
11 changed files with 45 additions and 16 deletions
|
|
@ -21,6 +21,7 @@ default-tls = ["librqbit/default-tls"]
|
|||
rust-tls = ["librqbit/rust-tls"]
|
||||
debug_slow_disk = ["librqbit/storage_middleware"]
|
||||
postgres = ["librqbit/postgres"]
|
||||
disable-upload = ["librqbit/disable-upload"]
|
||||
|
||||
[dependencies]
|
||||
librqbit = { version = "7.1.0-beta.0", path = "../librqbit", default-features = false, features = [
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ struct Opts {
|
|||
///
|
||||
/// Might be useful e.g. if rqbit upload consumes all your upload bandwidth and interferes
|
||||
/// with your other Internet usage.
|
||||
#[cfg(feature = "disable-upload")]
|
||||
#[arg(long, env = "RQBIT_DISABLE_UPLOAD")]
|
||||
disable_upload: bool,
|
||||
}
|
||||
|
|
@ -474,6 +475,7 @@ async fn async_main(opts: Opts, cancel: CancellationToken) -> anyhow::Result<()>
|
|||
root_span: None,
|
||||
fastresume: false,
|
||||
cancellation_token: Some(cancel.clone()),
|
||||
#[cfg(feature = "disable-upload")]
|
||||
disable_upload: opts.disable_upload,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue