feat(torrents): add global open-file limit

This commit is contained in:
NimBold
2026-08-02 10:50:30 +03:30
parent 48b4d984a2
commit 2d427b96d3
19 changed files with 332 additions and 6 deletions
+6
View File
@@ -30,6 +30,10 @@ fn default_torrent_enable_lpd() -> bool {
false
}
fn default_torrent_max_open_files() -> u32 {
crate::queue::DEFAULT_TORRENT_MAX_OPEN_FILES
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, TS)]
#[serde(rename_all = "lowercase")]
#[ts(export, export_to = "../../src/bindings/")]
@@ -493,6 +497,8 @@ pub struct PersistedSettings {
pub torrent_enable_pex: bool,
#[serde(default = "default_torrent_enable_lpd")]
pub torrent_enable_lpd: bool,
#[serde(default = "default_torrent_max_open_files")]
pub torrent_max_open_files: u32,
pub custom_user_agent: String,
pub ask_where_to_save_each_file: bool,
pub remember_last_used_download_directory: bool,