feat(readarr): fetch Readarr books and expose them on the CLI
This commit is contained in:
8 files changed
+264
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user