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

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 14:58:47 -06:00
1 parent 817ebeaf90
commit 4c6a9ece4e
7 files changed
+330 -4

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 editions for the book with the given ID")]
BookEditions {
#[arg(
long,
help = "The Readarr ID of the book whose editions you want to list",
required = true
)]
book_id: i64,
},
#[command(about = "List all books for the author with the given ID")]
Books {
#[arg(
@@ -106,6 +115,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::BookEditions { book_id } => {
let resp = self
.network
.handle_network_event(ReadarrEvent::GetBookEditions(book_id).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::Books { author_id } => {
let resp = self
.network