feat: CLI support for deleting a tag in Lidarr

This commit is contained in:
2026-01-07 12:50:23 -07:00
parent a18b047f4f
commit a8609e08c5
5 changed files with 124 additions and 15 deletions
+12
View File
@@ -28,6 +28,11 @@ pub enum LidarrDeleteCommand {
#[arg(long, help = "Add a list exclusion for this artist")]
add_list_exclusion: bool,
},
#[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<LidarrDeleteCommand> for Command {
@@ -73,6 +78,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, LidarrDeleteCommand> for LidarrDeleteComm
.await?;
serde_json::to_string_pretty(&resp)?
}
LidarrDeleteCommand::Tag { tag_id } => {
let resp = self
.network
.handle_network_event(LidarrEvent::DeleteTag(tag_id).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
};
Ok(result)