feat: Lidarr CLI support for listing and adding tags
This commit is contained in:
@@ -20,6 +20,8 @@ mod list_command_handler_tests;
|
||||
pub enum LidarrListCommand {
|
||||
#[command(about = "List all artists in your Lidarr library")]
|
||||
Artists,
|
||||
#[command(about = "List all Lidarr tags")]
|
||||
Tags,
|
||||
}
|
||||
|
||||
impl From<LidarrListCommand> for Command {
|
||||
@@ -56,6 +58,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, LidarrListCommand> for LidarrListCommandH
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
LidarrListCommand::Tags => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(LidarrEvent::GetTags.into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
};
|
||||
|
||||
Ok(result)
|
||||
|
||||
Reference in New Issue
Block a user