feat(readarr): fetch Readarr updates and expose them on the CLI
Adds ReadarrEvent::GetUpdates backed by get_readarr_updates, rendering the update history into the Readarr updates view, and surfaces it as 'readarr list updates'. Covers the case where an update record omits the changes key, which the live instance returns for its most recent release.
This commit is contained in:
6 files changed
+225
-3
No files matched your search
@@ -19,6 +19,8 @@ mod list_command_handler_tests;
|
||||
pub enum ReadarrListCommand {
|
||||
#[command(about = "List disk space details for all provisioned root folders in Readarr")]
|
||||
DiskSpace,
|
||||
#[command(about = "List all Readarr updates")]
|
||||
Updates,
|
||||
}
|
||||
|
||||
impl From<ReadarrListCommand> for Command {
|
||||
@@ -55,6 +57,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::Updates => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::GetUpdates.into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
};
|
||||
|
||||
Ok(result)
|
||||
|
||||
Reference in new issue
Block a user