Merge pull request #179 from ikatson/fix-desktop-upload-file

Fix #154 - desktop now can upload files properly
This commit is contained in:
Igor Katson 2024-08-12 19:57:51 +01:00 committed by GitHub
commit d01a10fb22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -296,6 +296,7 @@ fn merge_two_optional_streams<T>(
#[derive(Default, Serialize, Deserialize)]
pub struct AddTorrentOptions {
/// Start in paused state.
#[serde(default)]
pub paused: bool,
/// A regex to only download files matching it.
pub only_files_regex: Option<String>,
@ -304,8 +305,10 @@ pub struct AddTorrentOptions {
pub only_files: Option<Vec<usize>>,
/// Allow writing on top of existing files, including when resuming a torrent.
/// You probably want to set it, however for safety it's not default.
#[serde(default)]
pub overwrite: bool,
/// Only list the files in the torrent without starting it.
#[serde(default)]
pub list_only: bool,
/// The output folder for the torrent. If not set, the session's default one will be used.
pub output_folder: Option<String>,
@ -318,6 +321,7 @@ pub struct AddTorrentOptions {
/// Force a refresh interval for polling trackers.
pub force_tracker_interval: Option<Duration>,
#[serde(default)]
pub disable_trackers: bool,
/// Initial peers to start of with.