feat: Initial Lidarr support for searching for new artists

This commit is contained in:
2026-01-07 15:53:18 -07:00
parent d3947d9e15
commit 243de47cae
37 changed files with 1646 additions and 72 deletions
+16
View File
@@ -58,6 +58,15 @@ pub enum LidarrCommand {
about = "Commands to refresh the data in your Lidarr instance"
)]
Refresh(LidarrRefreshCommand),
#[command(about = "Search for a new artist to add to Lidarr")]
SearchNewArtist {
#[arg(
long,
help = "The name of the artist you want to search for",
required = true
)]
query: String,
},
#[command(
about = "Toggle monitoring for the specified artist corresponding to the given artist ID"
)]
@@ -128,6 +137,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, LidarrCommand> for LidarrCliHandler<'a, '
.handle()
.await?
}
LidarrCommand::SearchNewArtist { query } => {
let resp = self
.network
.handle_network_event(LidarrEvent::SearchNewArtist(query).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
LidarrCommand::ToggleArtistMonitoring { artist_id } => {
let resp = self
.network