Deleting and forgetting torrents

This commit is contained in:
Igor Katson 2023-11-24 21:45:38 +00:00
parent 4927850ff9
commit f789be22c9
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
3 changed files with 34 additions and 17 deletions

View file

@ -447,13 +447,13 @@ impl ApiInternal {
}
fn api_torrent_action_forget(&self, idx: TorrentId) -> Result<EmptyJsonResponse> {
Err(ApiError::not_implemented("forgetting not implemented yet"))
self.session.delete(idx, false)?;
Ok(Default::default())
}
fn api_torrent_action_delete(&self, idx: TorrentId) -> Result<EmptyJsonResponse> {
Err(ApiError::not_implemented(
"deleting torrent not implemented yet",
))
self.session.delete(idx, true)?;
Ok(Default::default())
}
pub async fn api_add_torrent(