feat(readarr): fetch Readarr book files and expose them on the CLI
This commit is contained in:
7 files changed
+274
-5
No files matched your search
@@ -37,6 +37,15 @@ pub enum ReadarrListCommand {
|
||||
)]
|
||||
book_id: i64,
|
||||
},
|
||||
#[command(about = "List all book files for the book with the given ID")]
|
||||
BookFiles {
|
||||
#[arg(
|
||||
long,
|
||||
help = "The Readarr ID of the book whose book files you want to list",
|
||||
required = true
|
||||
)]
|
||||
book_id: i64,
|
||||
},
|
||||
#[command(about = "List all books for the author with the given ID")]
|
||||
Books {
|
||||
#[arg(
|
||||
@@ -122,6 +131,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::BookFiles { book_id } => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::GetBookFiles(book_id).into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::Books { author_id } => {
|
||||
let resp = self
|
||||
.network
|
||||
|
||||
Reference in new issue
Block a user