mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
add files field for torrent-get
This commit is contained in:
parent
810ef71537
commit
cf1bdb95d2
@ -208,6 +208,7 @@ pub enum TorrentGetField {
|
|||||||
Sizewhendone,
|
Sizewhendone,
|
||||||
Status,
|
Status,
|
||||||
Trackers,
|
Trackers,
|
||||||
|
Files,
|
||||||
Downloaddir,
|
Downloaddir,
|
||||||
Uploadedever,
|
Uploadedever,
|
||||||
Uploadratio,
|
Uploadratio,
|
||||||
@ -248,6 +249,7 @@ impl TorrentGetField {
|
|||||||
TorrentGetField::Sizewhendone => "sizeWhenDone",
|
TorrentGetField::Sizewhendone => "sizeWhenDone",
|
||||||
TorrentGetField::Status => "status",
|
TorrentGetField::Status => "status",
|
||||||
TorrentGetField::Trackers => "trackers",
|
TorrentGetField::Trackers => "trackers",
|
||||||
|
TorrentGetField::Files => "files",
|
||||||
TorrentGetField::Downloaddir => "downloadDir",
|
TorrentGetField::Downloaddir => "downloadDir",
|
||||||
TorrentGetField::Uploadedever => "uploadedEver",
|
TorrentGetField::Uploadedever => "uploadedEver",
|
||||||
TorrentGetField::Uploadratio => "uploadRatio",
|
TorrentGetField::Uploadratio => "uploadRatio",
|
||||||
|
|||||||
@ -75,6 +75,7 @@ pub struct Torrent {
|
|||||||
pub upload_ratio: Option<f32>,
|
pub upload_ratio: Option<f32>,
|
||||||
#[serde(rename = "uploadedEver")]
|
#[serde(rename = "uploadedEver")]
|
||||||
pub uploaded_ever: Option<i64>,
|
pub uploaded_ever: Option<i64>,
|
||||||
|
pub files: Option<Vec<File>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug, RustcEncodable)]
|
#[derive(Deserialize, Debug, RustcEncodable)]
|
||||||
@ -89,6 +90,14 @@ pub struct Trackers {
|
|||||||
pub announce: String,
|
pub announce: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, Debug, RustcEncodable, Clone)]
|
||||||
|
pub struct File {
|
||||||
|
pub length: i64,
|
||||||
|
#[serde(rename = "bytesCompleted")]
|
||||||
|
pub bytes_completed: i64,
|
||||||
|
pub name: String,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug, RustcEncodable)]
|
#[derive(Deserialize, Debug, RustcEncodable)]
|
||||||
pub struct Nothing {}
|
pub struct Nothing {}
|
||||||
impl RpcResponseArgument for Nothing {}
|
impl RpcResponseArgument for Nothing {}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user