feat(readarr): search for new Readarr authors and expose the command on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-26 16:57:26 -06:00
1 parent 5042dbdb3a
commit 9238c1b9d2
7 files changed
+244 -4

No files matched your search

+16
View File
@@ -44,6 +44,15 @@ pub enum ReadarrCommand {
about = "Commands to list attributes from your Readarr instance"
)]
List(ReadarrListCommand),
#[command(about = "Search for a new author to add to Readarr")]
SearchNewAuthor {
#[arg(
long,
help = "The name of the author you want to search for",
required = true
)]
query: String,
},
#[command(about = "Start the specified Readarr task")]
StartTask {
#[arg(
@@ -103,6 +112,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrCommand> for ReadarrCliHandler<'a,
.handle()
.await?
}
ReadarrCommand::SearchNewAuthor { query } => {
let resp = self
.network
.handle_network_event(ReadarrEvent::SearchNewAuthor(query).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrCommand::StartTask { task_name } => {
let resp = self
.network