feat(readarr): fetch Readarr book details and expose them on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 14:51:40 -06:00
1 parent 41830cc072
commit 817ebeaf90
6 files changed
+147 -1

No files matched your search

+16
View File
@@ -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