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)]
|
||||
pub enum TorrentGetField {
|
||||
ActivityDate,
|
||||
AddedDate,
|
||||
DoneDate,
|
||||
DownloadDir,
|
||||
@ -287,6 +289,7 @@ impl TorrentGetField {
|
||||
#[must_use]
|
||||
pub fn to_str(&self) -> String {
|
||||
match self {
|
||||
TorrentGetField::ActivityDate => "activityDate",
|
||||
TorrentGetField::AddedDate => "addedDate",
|
||||
TorrentGetField::DoneDate => "doneDate",
|
||||
TorrentGetField::DownloadDir => "downloadDir",
|
||||
|
||||
@ -74,6 +74,8 @@ impl RpcResponseArgument for PortTest {}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct Torrent {
|
||||
#[serde(rename = "activityDate")]
|
||||
pub activity_date: Option<i64>,
|
||||
#[serde(rename = "addedDate")]
|
||||
pub added_date: Option<i64>,
|
||||
#[serde(rename = "doneDate")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user