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

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 14:38:51 -06:00
1 parent 8752a85db5
commit 41830cc072
8 files changed
+264 -2

No files matched your search

+16
View File
@@ -28,6 +28,15 @@ pub enum ReadarrListCommand {
},
#[command(about = "List all authors in your Readarr library")]
Authors,
#[command(about = "List all books for the author with the given ID")]
Books {
#[arg(
long,
help = "The Readarr ID of the author whose books you want to list",
required = true
)]
author_id: i64,
},
#[command(about = "List disk space details for all provisioned root folders in Readarr")]
DiskSpace,
#[command(about = "Fetch Readarr logs")]
@@ -97,6 +106,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::Books { author_id } => {
let resp = self
.network
.handle_network_event(ReadarrEvent::GetBooks(author_id).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::DiskSpace => {
let resp = self
.network