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,
|
||||
Status,
|
||||
Trackers,
|
||||
Files,
|
||||
Downloaddir,
|
||||
Uploadedever,
|
||||
Uploadratio,
|
||||
@ -248,6 +249,7 @@ impl TorrentGetField {
|
||||
TorrentGetField::Sizewhendone => "sizeWhenDone",
|
||||
TorrentGetField::Status => "status",
|
||||
TorrentGetField::Trackers => "trackers",
|
||||
TorrentGetField::Files => "files",
|
||||
TorrentGetField::Downloaddir => "downloadDir",
|
||||
TorrentGetField::Uploadedever => "uploadedEver",
|
||||
TorrentGetField::Uploadratio => "uploadRatio",
|
||||
|
||||
@ -75,6 +75,7 @@ pub struct Torrent {
|
||||
pub upload_ratio: Option<f32>,
|
||||
#[serde(rename = "uploadedEver")]
|
||||
pub uploaded_ever: Option<i64>,
|
||||
pub files: Option<Vec<File>>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, RustcEncodable)]
|
||||
@ -89,6 +90,14 @@ pub struct Trackers {
|
||||
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)]
|
||||
pub struct Nothing {}
|
||||
impl RpcResponseArgument for Nothing {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user