feat(readarr): fetch Readarr book history and expose it on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 15:40:08 -06:00
1 parent 634d1fc1b1
commit b48ce5db2e
6 files changed
+435 -4

No files matched your search

+22
View File
@@ -46,6 +46,21 @@ pub enum ReadarrListCommand {
)]
book_id: i64,
},
#[command(about = "Fetch all history events for the book with the given ID")]
BookHistory {
#[arg(
long,
help = "The Readarr ID of the author who wrote the book whose history you wish to fetch",
required = true
)]
author_id: i64,
#[arg(
long,
help = "The Readarr ID of the book whose history you wish to fetch",
required = true
)]
book_id: i64,
},
#[command(about = "List all books for the author with the given ID")]
Books {
#[arg(
@@ -138,6 +153,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::BookHistory { author_id, book_id } => {
let resp = self
.network
.handle_network_event(ReadarrEvent::GetBookHistory(author_id, book_id).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::Books { author_id } => {
let resp = self
.network