Skip to main content

PreferencesBuilder

Struct PreferencesBuilder 

Source
pub struct PreferencesBuilder { /* private fields */ }
Expand description

Builder for Preferences.

Implementations§

Source§

impl PreferencesBuilder

Source

pub fn locale<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Currently selected language (e.g. en_GB for English)

Source

pub fn performance_warning<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Log performance warnings as well as everything else.

Source

pub fn status_bar_external_ip<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should the client external IP be shown in the status bar?

Source

pub fn confirm_torrent_deletion<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Show a confirmation message before deleting a torrent. Does not apply to the API

Source

pub fn file_log_enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Enable storing logs to disk

Source

pub fn file_log_path<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

The folder to store logs to

Source

pub fn file_log_backup_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable backing up log files when the file gets too big.

Source

pub fn file_log_max_size<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

How big should the log file be before being backed up (in KiB)

Source

pub fn file_log_delete_old<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should old logs be deleted?

Source

pub fn file_log_age<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

How old does the log need to be before being auto deleted? See file_log_age_type

Source

pub fn file_log_age_type<VALUE: Into<FileAge>>( &mut self, value: VALUE, ) -> &mut Self

The type of age the log needs to be before being deleted.

Source

pub fn delete_torrent_content_files<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

To delete content files alongside the torrent. A “cache” setting

NOTE: In the webui, this setting is only visible by checking the icon next to the Also remove content files checkbox upon deleting a file.

Source

pub fn torrent_content_layout<VALUE: Into<ContentLayout>>( &mut self, value: VALUE, ) -> &mut Self

The default layout of the torrent content.

Source

pub fn add_to_top_of_queue<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

To add new torrents to the top of the queue by default or not?

Source

pub fn add_stopped_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Default setting for allowing new torrents to start automatically.

  • True = don’t start downloading automatically.
  • False = Start downloading automatically.
Source

pub fn torrent_stop_condition<VALUE: Into<StopCondition>>( &mut self, value: VALUE, ) -> &mut Self

When does the torrent stop

Source

pub fn merge_trackers<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

If the torrent exists, do we merge trackers with it or fail to add the torrent altogether?

Source

pub fn auto_delete_mode<VALUE: Into<AutoDeleteMode>>( &mut self, value: VALUE, ) -> &mut Self

When (and should) the .torrent file be deleted after added.

Source

pub fn preallocate_all<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should disk space be pre-allocated for all files?

Source

pub fn incomplete_files_ext<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should .!qb be added to incomplete files?

Source

pub fn use_unwanted_folder<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should unchecked files be added to the .unwanted folder?

See https://github.com/qbittorrent/qBittorrent/issues/13531 for an argument on the subject.

Source

pub fn auto_tmm_enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should Automatic Torrent Mangament be enabled for new torrents by default?

Source

pub fn torrent_changed_tmm_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should the torrent be relocated or switched to manual mode when category is changed?

True = Relocated, False = Manual Mode

Source

pub fn save_path_changed_tmm_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should the affected torrents be relocated or switched to manual mode when the default save/incomplete path is changed?

True = Relocated, False = Manual Mode

Source

pub fn category_changed_tmm_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should the affected torrents be relocated or switched to manual mode when it’s category save path has changed?

True = Relocated, False = Manual Mode

Source

pub fn save_path<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Default save path for torrents

Source

pub fn temp_path_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should another path be used for incomplete torrents?

Source

pub fn temp_path<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

The path to use for incomplete torrents.

Source

pub fn use_category_paths_in_manual_mode<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Use the path specified by the category even if the torrent is in manual mode.

Source

pub fn export_dir<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Path to copy .torrent files to.

Source

pub fn export_dir_finished<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Path to copy .torrent files of completed downloads to.

Source

pub fn scan_dirs<VALUE: Into<HashMap<String, ScanDir>>>( &mut self, value: VALUE, ) -> &mut Self

Directories to scan for .torrent files. ScanDir enum is used to overwrite the default save path of adding torrents.

NOTE: This is marked as deprecated in the qBittorrent source code. It might be removed or replaced in future versions.

Source

pub fn excluded_file_names_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Is the filename blacklist enabled?

Source

pub fn excluded_file_names<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

Blacklist filter file names from being downloaded from the torrent.

Files matching any of this list will have the priority set to Do Not Download by default. (newline separator)

The follow wildcards can be used:

  • *: Any character
  • ?: Any Single character
  • […]: Sets of characters
Source

pub fn mail_notification_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should email notifications be sent after a download is finished?

Source

pub fn mail_notification_sender<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

e-mail where notifications should originate from

Client Default: qBittorrent_notification@example.com

Source

pub fn mail_notification_email<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

e-mail to send notifications to

Source

pub fn mail_notification_smtp<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

smtp server for e-mail notifications

Source

pub fn mail_notification_ssl_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Does the smtp server require a secure connection (SSL)?

Source

pub fn mail_notification_auth_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Does the smtp server require authentication?

Source

pub fn mail_notification_username<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Username for smtp authentication

Source

pub fn mail_notification_password<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Password for smtp authentication

Source

pub fn autorun_on_torrent_added_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should an external program be run after a torrent has been added?

Source

pub fn autorun_on_torrent_added_program<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Program path/name/argumets to run if autorun_on_torrent_added_enabled is enabled.

See autorun_program for the supported parameters, tips and examples.

Source

pub fn autorun_enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Enables Mark-of-the-web. Tells external programs that this file is potentially unsafe. Should an external program be run after a torrent has completed?

Source

pub fn autorun_program<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Program path/name/arguments to run if autorun_enabled is enabled

Supported parameters (case sensitive)

  • %N: Torrent Name
  • %L: Torrent Category
  • %G: Torrent Tags (CSV)
  • %F: Torrent Content Path (same as root path for multi-file torrents)
  • %R: Torrent Root Path (first torrent subdirectory path)
  • %D: Torrent Save Path
  • %C: Number of files in torrent
  • %Z: Torrent Size (bytes)
  • %T: Current Tracker of Torrent
  • %I: Torrent Hash v1
  • %J: Torrent Hash v2
  • %K: Torrent ID

Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g., “%N”)

§Example
./path/to/some/program.sh "%N" "%C"
Source

pub fn listen_port<VALUE: Into<u16>>(&mut self, value: VALUE) -> &mut Self

Port for incoming connections

Source

pub fn ssl_enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should torrents use SSL connections

Source

pub fn ssl_listen_port<VALUE: Into<u16>>(&mut self, value: VALUE) -> &mut Self

The port for SSL Torrents to connect to.

Source

pub fn random_port<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

True if the port is randomly selected

NOTE: This is marked as deprecated in the src file Github referanse

Source

pub fn upnp<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Is UPnP/NAT-PMP enabled?

Source

pub fn max_connections<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Maximum global number of simultaneous connections

-1 means disabled

Source

pub fn max_connections_per_torrent<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of simultaneous connections per torrent

-1 means disabled

Source

pub fn max_uploads<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Maximum number of upload slots

-1 means disabled

Source

pub fn max_uploads_per_torrent<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of upload slots per torrent

-1 means disabled

Source

pub fn i2p_enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Is I2P (Invisible Internet Project) networking enabled?

NOTE: This is experimental!

Source

pub fn i2p_address<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

I2P SAM bridge address

Source

pub fn i2p_port<VALUE: Into<u16>>(&mut self, value: VALUE) -> &mut Self

I2P SAM bridge port

Source

pub fn i2p_mixed_mode<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should I2P mixed mode be enabled? (allows both I2P and regular connections)

Source

pub fn i2p_inbound_quantity<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Number of inbound I2P tunnels to create

Source

pub fn i2p_outbound_quantity<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Number of outbound I2P tunnels to create

Source

pub fn i2p_inbound_length<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Length of inbound I2P tunnels (number of hops)

Source

pub fn i2p_outbound_length<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Length of outbound I2P tunnels (number of hops)

Source

pub fn proxy_type<VALUE: Into<ProxyType>>(&mut self, value: VALUE) -> &mut Self

The protocol to use for the proxy server

Source

pub fn proxy_ip<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Proxy IP address or domain name

Source

pub fn proxy_port<VALUE: Into<u16>>(&mut self, value: VALUE) -> &mut Self

Proxy port

Source

pub fn proxy_auth_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Does the proxy require authentication?

Note: This does not apply when ProxyType is SOCKS4

Source

pub fn proxy_username<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Username for proxy authentication

Source

pub fn proxy_password<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Password for proxy authentication

Source

pub fn proxy_hostname_lookup<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should the proxyy be used for Hostname lookup?

Source

pub fn proxy_bittorrent<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should the proxyy be used for bittorrent purposes?

Source

pub fn proxy_peer_connections<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should the proxyy be used for peer and web seed connections?

Note: requires proxy_bittorrent

Source

pub fn proxy_rss<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should the proxyy be used for RSS purposes?

Source

pub fn proxy_misc<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should the proxyy be used for General purposes?

Source

pub fn ip_filter_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should external IPs be filtered?

Source

pub fn ip_filter_path<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Path to IP filter file (.dat, .p2p, .p2b files are supported); path is separated by slashes

Source

pub fn ip_filter_trackers<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Is the IP filter also applied to trackers?

Source

pub fn banned_ips<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

List of banned IPs. Separated by new lines (\n)

Source

pub fn dl_limit<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Global download speed limit in KiB/s; 0 means unlimited

Note: Value is in Bytes.

Source

pub fn up_limit<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Global upload speed limit in KiB/s; 0 means unlimited

Note: Value is in Bytes.

Source

pub fn alt_dl_limit<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Alternative global download speed limit in KiB/s. 0 means unlimited

Note: Value is in Bytes.

Source

pub fn alt_up_limit<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Alternative global upload speed limit in KiB/s. 0 means unlimited

Note: Value is in Bytes.

Source

pub fn bittorrent_protocol<VALUE: Into<BittorrentProtocol>>( &mut self, value: VALUE, ) -> &mut Self

Bittorrent Protocol to use (see list of possible values below)

Source

pub fn limit_utp_rate<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should dl_limit be applied to uTP connections?

Source

pub fn limit_tcp_overhead<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should dl_limit be applied to estimated TCP overhead? (e.g. service data such as packet headers)

Source

pub fn limit_lan_peers<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should dl_limit be applied to peers on the LAN?

Source

pub fn scheduler_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should alternative limits be applied according to the schedule

Source

pub fn schedule_from_hour<VALUE: Into<i8>>(&mut self, value: VALUE) -> &mut Self

Scheduler starting hour

Source

pub fn schedule_from_min<VALUE: Into<i8>>(&mut self, value: VALUE) -> &mut Self

Scheduler starting minute

Source

pub fn schedule_to_hour<VALUE: Into<i8>>(&mut self, value: VALUE) -> &mut Self

Scheduler ending hour

Source

pub fn schedule_to_min<VALUE: Into<i8>>(&mut self, value: VALUE) -> &mut Self

Scheduler ending minute

Source

pub fn scheduler_days<VALUE: Into<SchedulerTime>>( &mut self, value: VALUE, ) -> &mut Self

Days on which the schedule is applied.

Source

pub fn dht<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Is DHT (Decentrialized Network) enabled?

See https://superuser.com/a/592244 for more info.

Source

pub fn pex<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Is PeX (Peer Exchange) enabled?

Source

pub fn lsd<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Is LSD (Local Peer Discovery) enabled?

Source

pub fn encryption<VALUE: Into<Encryption>>(&mut self, value: VALUE) -> &mut Self

State of encryption for file transfer.

Source

pub fn anonymous_mode<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Is the user anonymous?

WARNING: This doesn’t grant enough protection on its own. See https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode for more information.

Source

pub fn max_active_checking_torrents<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

How many torrents can be actively checking at one time.

Source

pub fn queueing_enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Is torrent queuing enabled?

Source

pub fn max_active_downloads<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of active simultaneous downloads

Source

pub fn max_active_torrents<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of active simultaneous downloads and uploads

Source

pub fn max_active_uploads<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of active simultaneous uploads

Source

pub fn dont_count_slow_torrents<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

If true torrents w/o any activity (stalled ones) will not be counted towards max_active_* limits

Source

pub fn slow_torrent_dl_rate_threshold<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Download rate in KiB/s for a torrent to be considered “slow”

Source

pub fn slow_torrent_ul_rate_threshold<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Upload rate in KiB/s for a torrent to be considered “slow”

Source

pub fn slow_torrent_inactive_timer<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Seconds a torrent should be inactive before considered “slow”

Source

pub fn max_ratio_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Show an action be taken once the torrent ratio is achieved?

Source

pub fn max_ratio<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

THe ratio to achieve to take an action.

Source

pub fn max_seeding_time_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should an action be taken once the torrent has been seeding for a certain amount of time?

Source

pub fn max_seeding_time<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Number of minutes to seed a torrent before an action is taken

-1 = disabled (will also set max_seeding_time_enabled to false)

Source

pub fn max_inactive_seeding_time_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should an action be taken once the torrent has been inactive (during seeding) for a certain amount of time?

Source

pub fn max_inactive_seeding_time<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Number of minutes for the torrent to be inactive (during seeding) before an action is taken.

-1 = disabled (will also set max_inactive_seeding_time_enabled to false)

Source

pub fn max_ratio_act<VALUE: Into<SeedLimitActions>>( &mut self, value: VALUE, ) -> &mut Self

Action performed when a torrent reaches a ratio / seed limit.

See: max_ratio, max_seeding_time and max_inactive_seeding_time

The selected action in max_ratio_act is executed when either condition is met:

  • If max_ratio_enabled is true and the torrent’s ratio reaches or exceeds max_ratio.
  • If max_seeding_time_enabled is true and the torrent has been seeding for at least max_seeding_time minutes.
  • If max_inactive_seeding_time_enabled is true and the torrent has been inactive (during seeding) for at least max_inactive_seeding_time minutes.

If any are enabled, the action occurs when either condition is satisfied.

Source

pub fn add_trackers_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable automatic adding of trackers to new torrents

Source

pub fn add_trackers<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

List of trackers to add to new torrent. Separated by a new line (\n)

Source

pub fn add_trackers_from_url_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enables automatic adding of trackers (from URL) to a new torrent

Source

pub fn add_trackers_url<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

The URL to get the trackers from

Source

pub fn add_trackers_url_list<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

Read-only list of trackers automatiaclly updated from provided url in add_trackers_url.

Source

pub fn web_ui_domain_list<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Semicolon-separated list of domains to accept when performing Host header validation. Accepts: ‘*’

Requires: web_ui_host_header_validation_enabled to be true.

Source

pub fn web_ui_address<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

IP address to use for the WebUI. Accepts: ‘*’

Source

pub fn web_ui_port<VALUE: Into<u16>>(&mut self, value: VALUE) -> &mut Self

WebUI port

Source

pub fn web_ui_upnp<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Use UPnP for port forwarding from the router

Source

pub fn use_https<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Does the server use HTTPS?

Source

pub fn web_ui_https_cert_path<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

For API ≥ v2.0.1: Path to SSL certificate

See https://httpd.apache.org/docs/current/ssl/ssl_faq.html#aboutcerts for information on certificates.

Source

pub fn web_ui_https_key_path<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

For API ≥ v2.0.1: Path to SSL keyfile

Source

pub fn web_ui_username<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

WebUI username

Source

pub fn web_ui_password<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

For API ≥ v2.3.0: Plaintext WebUI password. This field is write-only and cannot be read back.

The password is used exclusively for setting or updating the WebUI password.

Source

pub fn bypass_local_auth<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

True if authentication challenge for loopback address (127.0.0.1) should be disabled

Source

pub fn bypass_auth_subnet_whitelist_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

True if webui authentication should be bypassed for clients whose ip resides within (at least) one of the subnets on the whitelist

Source

pub fn bypass_auth_subnet_whitelist<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

(White)list of ipv4/ipv6 subnets for which webui authentication should be bypassed;

Source

pub fn web_ui_max_auth_fail_count<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of authentication failures before WebUI access ban

Source

pub fn web_ui_ban_duration<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

WebUI access ban duration in seconds

Source

pub fn web_ui_session_timeout<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Seconds until WebUI is automatically signed off

Source

pub fn web_ui_api_key<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

API key for WebUI authentication

Source

pub fn alternative_webui_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Should an alternative web ui be used?

NOTE: This is not the same as a theme (.qbttheme)

Source

pub fn alternative_webui_path<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

File path to the alternative WebUI

Source

pub fn web_ui_clickjacking_protection_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

True if WebUI clickjacking protection is enabled

Source

pub fn web_ui_csrf_protection_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

True if WebUI CSRF protection is enabled

True if WebUI cookie Secure flag is enabled (requires use_https)

Source

pub fn web_ui_host_header_validation_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Is WebUI Host header validated?

Source

pub fn web_ui_use_custom_http_headers_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

For API ≥ v2.5.1: Enable custom http headers

Source

pub fn web_ui_custom_http_headers<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

For API ≥ v2.5.1: List of custom http headers.

Format: Key: Value.

Source

pub fn web_ui_reverse_proxy_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Are using reverse proxies allowed?

Source

pub fn web_ui_reverse_proxies_list<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

List of trusted proxies to access the webui. Separated by ;

Source

pub fn dyndns_enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should the server DNS be updated dynamically?

Source

pub fn dyndns_service<VALUE: Into<DyndnsService>>( &mut self, value: VALUE, ) -> &mut Self

The DNS service that is in use.

Source

pub fn dyndns_username<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Username for DDNS service

Source

pub fn dyndns_password<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Password for DDNS service

Source

pub fn dyndns_domain<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Your DDNS domain name

Source

pub fn rss_refresh_interval<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

How long (in minutes) before the feeds are refreshed?

Source

pub fn rss_fetch_delay<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self

How long (in seconds) should be waited before a fetch request from the same host?

Source

pub fn rss_max_articles_per_feed<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of articles stored per feed.

Source

pub fn rss_processing_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable processing of RSS feeds (Also enables fetching them, etc)

Source

pub fn rss_auto_downloading_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable auto-downloading of torrents from the RSS feeds

Source

pub fn rss_download_repack_proper_episodes<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable downloading of repack/proper Episodes

Source

pub fn rss_smart_episode_filters<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

List of RSS Smart Episode Filters.

Source

pub fn resume_data_storage_type<VALUE: Into<FastResumeType>>( &mut self, value: VALUE, ) -> &mut Self

What type of storage should be used to save the Fastresume files.

Source

pub fn torrent_content_remove_option<VALUE: Into<TorrentDeletion>>( &mut self, value: VALUE, ) -> &mut Self

What to do with removing torrents.

Source

pub fn memory_working_set_limit<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Memory usage limit of Physical RAM in MiB

Source

pub fn current_network_interface<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Network Interface used

Source

pub fn current_interface_name<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

The name of the network interface used.

Source

pub fn current_interface_address<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

IP Address to bind to. Empty String means All addresses

Source

pub fn save_resume_data_interval<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

How often the fastresume file is saved (in minutes). 0 = disabled

Source

pub fn save_statistics_interval<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

How often the statistics file is saved (in minutes). 0 = disabled

Source

pub fn torrent_file_size_limit<VALUE: Into<i64>>( &mut self, value: VALUE, ) -> &mut Self

The size limit of .torrent files

Source

pub fn confirm_torrent_recheck<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Show a confirmation message before rechecking a torrent. Does not apply to the API

Source

pub fn recheck_completed_torrents<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Recheck the torrent upon the torrent being completed.

Source

pub fn app_instance_name<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Customise the name of the app instance

Source

pub fn refresh_interval<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

How often should the UI refresh to get new updates? (in ms)

Source

pub fn resolve_peer_host_names<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Resolve peer host names

Source

pub fn resolve_peer_countries<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

True resolves peer countries

Source

pub fn reannounce_when_address_changed<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Tells all trackers when either the IP or Port of our client changes.

Source

pub fn enable_embedded_tracker<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable qbittorrent to become a tracker.

See https://github.com/qbittorrent/qBittorrent/wiki/How-to-use-qBittorrent-as-a-tracker for more information.

Source

pub fn embedded_tracker_port<VALUE: Into<u16>>( &mut self, value: VALUE, ) -> &mut Self

The port used for the embedded tracker.

Source

pub fn embedded_tracker_port_forwarding<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enables the embedded tracker to use port forwarding.

Source

pub fn mark_of_the_web<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Windows (MOTW) and Mac (quarantine) only

Source

pub fn ignore_ssl_errors<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Affects certification validation and non-torrent activities.

Source

pub fn python_executable_path<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Python executable path. For use in stuff like search engine plugins which require python.

Will attempt to find and use a system wide one if nothing is specified.

Source

pub fn bdecode_depth_limit<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Specify the max number of nested lists/dictionaries in the data structure

See https://www.libtorrent.org/reference-Bdecoding.html#bdecode() for more information

Source

pub fn bdecode_token_limit<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

The maximum number of tokens to be parsed from the buffer.

See https://www.libtorrent.org/reference-Bdecoding.html#bdecode() for more information

Source

pub fn async_io_threads<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Number of asynchronous I/O threads

Source

pub fn hashing_threads<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Number of threads to use for piece hash verification

See https://www.libtorrent.org/reference-Settings.html#hashing_threads for more information.

Source

pub fn file_pool_size<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

The maximum number of files this session will keep open.

See https://www.libtorrent.org/reference-Settings.html#file_pool_size for more information.

Source

pub fn checking_memory_use<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Keep x number of blocks outstanding to allow for faster re-checks at cost of memory. Value in MiB.

See https://www.libtorrent.org/reference-Settings.html#checking_mem_usage for more information.

Source

pub fn disk_cache<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Disk cache used in MiB

Only supported in LibTorrent < 2.0

Source

pub fn disk_cache_ttl<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Disk cache expiry interval in seconds

Only supported in LibTorrent < 2.0

Source

pub fn disk_queue_size<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self

Maximum number of bytes that can wait in the I/O thread queue.

See https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes for more information.

Source

pub fn disk_io_type<VALUE: Into<DiskIOType>>( &mut self, value: VALUE, ) -> &mut Self

Configure how libtorrent should perform disk I/O for reading and writing torrent data.

See: https://www.libtorrent.org/single-page-ref.html#default-disk-io-constructor

Source

pub fn disk_io_read_mode<VALUE: Into<DiskRead>>( &mut self, value: VALUE, ) -> &mut Self

Is the OS allowed to cache read data from files?

Source

pub fn disk_io_write_mode<VALUE: Into<DiskWrite>>( &mut self, value: VALUE, ) -> &mut Self

Is the OS allowed to cache write data to files?

Source

pub fn enable_coalesce_read_write<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable coalesce read/writes

Requires LibTorrent < 2.0.0

Source

pub fn enable_piece_extent_affinity<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enables LibTorrent piece_extent_affinity setting.

See https://libtorrent.org/single-page-ref.html#piece_extent_affinity for more information.

Source

pub fn enable_upload_suggestions<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Enable sending out a message with recent read pieces of a torrent in order to create a bias.

See https://www.libtorrent.org/reference-Settings.html#suggest_mode for more information.

Source

pub fn send_buffer_watermark<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Send buffer watermark in KiB. If the send buffer has fewer bytes than this value, another block will be read onto it; setting it too small hurts upload capacity, too large wastes memory.

See https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark for more information

Source

pub fn send_buffer_low_watermark<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Send buffer low watermark in KiB. The minimum send buffer target size (includes bytes pending read from disk); for snappy seeding set this high enough to fit a few blocks.

See https://www.libtorrent.org/reference-Settings.html#send_buffer_low_watermark for more information

Source

pub fn send_buffer_watermark_factor<VALUE: Into<i64>>( &mut self, value: VALUE, ) -> &mut Self

Send buffer watermark factor in percent. The current upload rate to a peer is multiplied by this percentage to derive the watermark (clamped to send_buffer_watermark); higher values can improve throughput but may waste RAM.

See https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark_factor for more information

Source

pub fn connection_speed<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Number of connection attempts made per second.

If number < 0, a default of 200 will be made.

Source

pub fn socket_send_buffer_size<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Specify the buffer size on receiving peer sockets. 0 = system default.

See https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size for more information

Source

pub fn socket_receive_buffer_size<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Specify the buffer size on sending peer sockets. 0 = system default.

See https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size for more information

Source

pub fn socket_backlog_size<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Number of outstanding incoming connections to queue whilst not actively waiting for one to be accepted

See https://www.libtorrent.org/reference-Settings.html#listen_queue_size for more information

Source

pub fn outgoing_ports_min<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Minimal outgoing port (0: Disabled)

See https://www.libtorrent.org/reference-Settings.html#outgoing_port for more information

Source

pub fn outgoing_ports_max<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximal outgoing port (0: Disabled)

See https://www.libtorrent.org/reference-Settings.html#outgoing_port for more information

Source

pub fn upnp_lease_duration<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

upnp lease duration specified in seconds (0: Permanent lease)

See https://www.libtorrent.org/reference-Settings.html#upnp_lease_duration for more information

Source

pub fn peer_dscp<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Determinds the DSCP field in the IP header

See https://www.libtorrent.org/reference-Settings.html#peer_dscp for more information

Source

pub fn utp_tcp_mixed_mode<VALUE: Into<UtpTcpMixedMode>>( &mut self, value: VALUE, ) -> &mut Self

μTP-TCP mixed mode algorithm (see list of possible values below)

Source

pub fn hostname_cache_ttl<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Hostname resolver cache TTL

Source

pub fn idn_support_enabled<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Allows trackers/web seeds with an internationalised domain name.

See https://www.libtorrent.org/reference-Settings.html#allow_idna for more information.

Source

pub fn enable_multi_connections_from_same_ip<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Allows multiple connections from the same IP address.

See https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip for more information.

Source

pub fn validate_https_tracker_certificate<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Makes the certificate of trackers and web seeds validated against the system certificate.

See https://www.libtorrent.org/reference-Settings.html#validate_https_trackers for more information.

Source

pub fn ssrf_mitigation<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Should Server-side request forgery (SSRF) be mitigated?

Source

pub fn block_peers_on_privileged_ports<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Don’t make network requests to peers who ports are < 1024

See https://libtorrent.org/single-page-ref.html#no_connect_privileged_ports for more information

Source

pub fn upload_slots_behavior<VALUE: Into<UploadSlotsBehavior>>( &mut self, value: VALUE, ) -> &mut Self

Specify which algorithm to use to determine how many peers to unchoke.

See https://www.libtorrent.org/reference-Settings.html#choking_algorithm for more information

Source

pub fn upload_choking_algorithm<VALUE: Into<UploadChokingAlgorithm>>( &mut self, value: VALUE, ) -> &mut Self

Controls the bahviour of unchocking. How peers are selected

Read more: https://transfercloud.io/blog/2024/02/26/what-is-torrent-chokin/

Source

pub fn announce_to_all_trackers<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Always announce to all trackers in a tier.

See https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers for more information

Source

pub fn announce_to_all_tiers<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self

Always announce to all tiers.

See https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers for more information

Source

pub fn announce_ip<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

The IP address passed along to trackers. Requires qbittorrent restart

More information: https://www.libtorrent.org/reference-Settings.html#announce_ip

Source

pub fn announce_port<VALUE: Into<u16>>(&mut self, value: VALUE) -> &mut Self

The port reported to trackers. 0 uses listening_port.

Source

pub fn max_concurrent_http_announces<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Limits the number of concurrent HTTP tracker announces.

See https://www.libtorrent.org/reference-Settings.html#max_concurrent_http_announces for more information.

Source

pub fn stop_tracker_timeout<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Timeout in seconds for a stopped announce request to trackers

If the value is set to 0, the connections to trackers with the stopped event are suppressed.

Source

pub fn peer_turnover<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self

Percentage of peers to disconnect every turnover.

See https://www.libtorrent.org/reference-Settings.html#peer_turnover for more information.

Source

pub fn peer_turnover_cutoff<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

The limit of the maximum limit before turnover starts

See https://www.libtorrent.org/reference-Settings.html#peer_turnover for more information.

Source

pub fn peer_turnover_interval<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

How often the turnover occurs

See https://www.libtorrent.org/reference-Settings.html#peer_turnover for more information.

Source

pub fn request_queue_size<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self

Maximum number of outstanding requests to send to a peer.

See ttps://www.libtorrent.org/reference-Settings.html#max_out_request_queue for more information.

Source

pub fn dht_bootstrap_nodes<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

CSV of IP port-pairs added to the DHT Node if enabled

See https://www.libtorrent.org/reference-Settings.html#dht_bootstrap_nodes for more information

Source

pub fn build(&self) -> Result<Preferences, PreferencesBuilderError>

Builds a new Preferences.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for PreferencesBuilder

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for PreferencesBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more