feat(readarr): fetch Readarr tasks and expose them on the CLI
Adds ReadarrEvent::GetTasks backed by get_readarr_tasks, populating the Readarr tasks table, and surfaces it as 'readarr list tasks'.
This commit is contained in:
6 files changed
+132
-2
No files matched your search
@@ -29,6 +29,8 @@ pub enum ReadarrListCommand {
|
||||
)]
|
||||
output_in_log_format: bool,
|
||||
},
|
||||
#[command(about = "List all Readarr tasks")]
|
||||
Tasks,
|
||||
#[command(about = "List all Readarr updates")]
|
||||
Updates,
|
||||
}
|
||||
@@ -84,6 +86,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
|
||||
serde_json::to_string_pretty(&logs)?
|
||||
}
|
||||
}
|
||||
ReadarrListCommand::Tasks => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::GetTasks.into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::Updates => {
|
||||
let resp = self
|
||||
.network
|
||||
|
||||
Reference in new issue
Block a user