feat(readarr): fetch Readarr queued events and expose them on the CLI
An empty array is a valid response when nothing is queued, so the empty case is covered by its own test.
This commit is contained in:
6 files changed
+153
-4
No files matched your search
@@ -29,6 +29,8 @@ pub enum ReadarrListCommand {
|
||||
)]
|
||||
output_in_log_format: bool,
|
||||
},
|
||||
#[command(about = "List all queued events")]
|
||||
QueuedEvents,
|
||||
#[command(about = "List all Readarr tasks")]
|
||||
Tasks,
|
||||
#[command(about = "List all Readarr updates")]
|
||||
@@ -86,6 +88,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
|
||||
serde_json::to_string_pretty(&logs)?
|
||||
}
|
||||
}
|
||||
ReadarrListCommand::QueuedEvents => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::GetQueuedEvents.into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::Tasks => {
|
||||
let resp = self
|
||||
.network
|
||||
|
||||
Reference in new issue
Block a user