Per-tracker seeding rules and torrent reaper (#88)
This commit was merged in pull request #88.
This commit is contained in:
@@ -68,6 +68,9 @@ pub struct Torrent {
|
||||
pub progress: f64,
|
||||
pub download_dir: PathBuf,
|
||||
pub labels: Vec<String>,
|
||||
/// Transmission has stopped this torrent because its configured seeding
|
||||
/// ratio or idle limit was reached.
|
||||
pub is_finished: bool,
|
||||
}
|
||||
|
||||
/// One file inside a torrent, as Transmission reports it.
|
||||
@@ -225,7 +228,7 @@ impl TransmissionClient {
|
||||
json!({
|
||||
"fields": [
|
||||
"id", "name", "hashString", "status", "percentDone",
|
||||
"downloadDir", "labels"
|
||||
"downloadDir", "labels", "isFinished"
|
||||
]
|
||||
}),
|
||||
)
|
||||
@@ -383,6 +386,8 @@ struct RpcTorrent {
|
||||
download_dir: PathBuf,
|
||||
#[serde(default)]
|
||||
labels: Vec<String>,
|
||||
#[serde(rename = "isFinished", default)]
|
||||
is_finished: bool,
|
||||
}
|
||||
|
||||
impl From<RpcTorrent> for Torrent {
|
||||
@@ -406,6 +411,7 @@ impl From<RpcTorrent> for Torrent {
|
||||
progress: value.progress,
|
||||
download_dir: value.download_dir,
|
||||
labels: value.labels,
|
||||
is_finished: value.is_finished,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user