feat(cli): Added Sonarr support for fetching host and security configs

This commit is contained in:
2024-11-18 20:59:27 -07:00
parent a012945df2
commit 4fc2d3c94b
4 changed files with 81 additions and 6 deletions
+10
View File
@@ -28,6 +28,10 @@ pub enum SonarrGetCommand {
)]
episode_id: i64,
},
#[command(about = "Fetch the host config for your Sonarr instance")]
HostConfig,
#[command(about = "Fetch the security config for your Sonarr instance")]
SecurityConfig,
#[command(about = "Get the system status")]
SystemStatus,
}
@@ -62,6 +66,12 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, SonarrGetCommand> for SonarrGetCommandHan
SonarrGetCommand::EpisodeDetails { episode_id } => {
execute_network_event!(self, SonarrEvent::GetEpisodeDetails(Some(episode_id)));
}
SonarrGetCommand::HostConfig => {
execute_network_event!(self, SonarrEvent::GetHostConfig);
}
SonarrGetCommand::SecurityConfig => {
execute_network_event!(self, SonarrEvent::GetSecurityConfig);
}
SonarrGetCommand::SystemStatus => {
execute_network_event!(self, SonarrEvent::GetStatus);
}