mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
Support setting labels on torrent add
This commit is contained in:
parent
28e554a793
commit
fc0f3bd023
@ -195,7 +195,7 @@ pub enum Id {
|
|||||||
Hash(String),
|
Hash(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Debug, Default, Clone)]
|
#[derive(Serialize, Debug, Default, Clone, Default)]
|
||||||
pub struct TorrentAddArgs {
|
pub struct TorrentAddArgs {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub cookies: Option<String>,
|
pub cookies: Option<String>,
|
||||||
@ -232,25 +232,8 @@ pub struct TorrentAddArgs {
|
|||||||
/// list of indices of files to be downloaded with normal priority
|
/// list of indices of files to be downloaded with normal priority
|
||||||
#[serde(skip_serializing_if = "Option::is_none", rename = "priority-normal")]
|
#[serde(skip_serializing_if = "Option::is_none", rename = "priority-normal")]
|
||||||
pub priority_normal: Option<Vec<i32>>,
|
pub priority_normal: Option<Vec<i32>>,
|
||||||
}
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub labels: Option<Vec<String>>,
|
||||||
impl Default for TorrentAddArgs {
|
|
||||||
fn default() -> Self {
|
|
||||||
TorrentAddArgs {
|
|
||||||
cookies: None,
|
|
||||||
download_dir: None,
|
|
||||||
filename: None,
|
|
||||||
metainfo: None,
|
|
||||||
paused: None,
|
|
||||||
peer_limit: None,
|
|
||||||
bandwidth_priority: None,
|
|
||||||
files_wanted: None,
|
|
||||||
files_unwanted: None,
|
|
||||||
priority_high: None,
|
|
||||||
priority_low: None,
|
|
||||||
priority_normal: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Sequence)]
|
#[derive(Clone, Sequence)]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user