feat(network): Support for listing disk space on a Sonarr instance

This commit is contained in:
2024-11-22 15:54:11 -07:00
parent d96316577a
commit a881d1f33a
17 changed files with 185 additions and 39 deletions
+12
View File
@@ -42,6 +42,11 @@ pub enum SonarrDeleteCommand {
#[arg(long, help = "The ID of the root folder to delete", required = true)]
root_folder_id: i64,
},
#[command(about = "Delete the tag with the specified ID")]
Tag {
#[arg(long, help = "The ID of the tag to delete", required = true)]
tag_id: i64,
},
}
impl From<SonarrDeleteCommand> for Command {
@@ -99,6 +104,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, SonarrDeleteCommand> for SonarrDeleteComm
.await?;
serde_json::to_string_pretty(&resp)?
}
SonarrDeleteCommand::Tag { tag_id } => {
let resp = self
.network
.handle_network_event(SonarrEvent::DeleteTag(tag_id).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
};
Ok(resp)