feat(readarr): search for new Readarr authors and expose the command on the CLI
This commit is contained in:
7 files changed
+244
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user