feat(readarr): fetch the Readarr host config and expose it on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-20 16:07:33 -06:00
1 parent 520b422dcc
commit 1072585903
6 files changed
+123 -3

No files matched your search

+9
View File
@@ -18,6 +18,8 @@ mod get_command_handler_tests;
#[derive(Debug, Clone, PartialEq, Eq, Subcommand)]
pub enum ReadarrGetCommand {
#[command(about = "Fetch the host config for your Readarr instance")]
HostConfig,
#[command(about = "Get the system status")]
SystemStatus,
}
@@ -49,6 +51,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrGetCommand> for ReadarrGetCommandH
async fn handle(self) -> Result<String> {
let result = match self.command {
ReadarrGetCommand::HostConfig => {
let resp = self
.network
.handle_network_event(ReadarrEvent::GetHostConfig.into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrGetCommand::SystemStatus => {
let resp = self
.network