feat(readarr): fetch Readarr book details and expose them on the CLI
This commit is contained in:
6 files changed
+147
-1
No files matched your search
@@ -27,6 +27,15 @@ pub enum ReadarrGetCommand {
|
||||
)]
|
||||
author_id: i64,
|
||||
},
|
||||
#[command(about = "Get detailed information for the book with the given ID")]
|
||||
BookDetails {
|
||||
#[arg(
|
||||
long,
|
||||
help = "The Readarr ID of the book whose details you wish to fetch",
|
||||
required = true
|
||||
)]
|
||||
book_id: i64,
|
||||
},
|
||||
#[command(about = "Fetch the host config for your Readarr instance")]
|
||||
HostConfig,
|
||||
#[command(about = "Fetch the security config for your Readarr instance")]
|
||||
@@ -69,6 +78,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrGetCommand> for ReadarrGetCommandH
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrGetCommand::BookDetails { book_id } => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::GetBookDetails(book_id).into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrGetCommand::HostConfig => {
|
||||
let resp = self
|
||||
.network
|
||||
|
||||
Reference in new issue
Block a user