mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
Support torrent activity date
This commit is contained in:
parent
6d12272018
commit
4a8a351e5b
@ -245,8 +245,10 @@ impl Default for TorrentAddArgs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/transmission/transmission/blob/main/docs/rpc-spec.md
|
||||||
#[derive(Clone, Sequence)]
|
#[derive(Clone, Sequence)]
|
||||||
pub enum TorrentGetField {
|
pub enum TorrentGetField {
|
||||||
|
ActivityDate,
|
||||||
AddedDate,
|
AddedDate,
|
||||||
DoneDate,
|
DoneDate,
|
||||||
DownloadDir,
|
DownloadDir,
|
||||||
@ -287,6 +289,7 @@ impl TorrentGetField {
|
|||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn to_str(&self) -> String {
|
pub fn to_str(&self) -> String {
|
||||||
match self {
|
match self {
|
||||||
|
TorrentGetField::ActivityDate => "activityDate",
|
||||||
TorrentGetField::AddedDate => "addedDate",
|
TorrentGetField::AddedDate => "addedDate",
|
||||||
TorrentGetField::DoneDate => "doneDate",
|
TorrentGetField::DoneDate => "doneDate",
|
||||||
TorrentGetField::DownloadDir => "downloadDir",
|
TorrentGetField::DownloadDir => "downloadDir",
|
||||||
|
|||||||
@ -74,6 +74,8 @@ impl RpcResponseArgument for PortTest {}
|
|||||||
|
|
||||||
#[derive(Deserialize, Debug, Clone)]
|
#[derive(Deserialize, Debug, Clone)]
|
||||||
pub struct Torrent {
|
pub struct Torrent {
|
||||||
|
#[serde(rename = "activityDate")]
|
||||||
|
pub activity_date: Option<i64>,
|
||||||
#[serde(rename = "addedDate")]
|
#[serde(rename = "addedDate")]
|
||||||
pub added_date: Option<i64>,
|
pub added_date: Option<i64>,
|
||||||
#[serde(rename = "doneDate")]
|
#[serde(rename = "doneDate")]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user