feat(cli): Added CLI support for fetching all indexer settings for Sonarr

This commit is contained in:
2024-11-18 21:25:50 -07:00
parent 7870bb4b5b
commit 9ceb55a314
3 changed files with 42 additions and 1 deletions
+5
View File
@@ -19,6 +19,8 @@ mod get_command_handler_tests;
#[derive(Debug, Clone, PartialEq, Eq, Subcommand)]
pub enum SonarrGetCommand {
#[command(about = "Get the shared settings for all indexers")]
AllIndexerSettings,
#[command(about = "Get detailed information for the episode with the given ID")]
EpisodeDetails {
#[arg(
@@ -63,6 +65,9 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, SonarrGetCommand> for SonarrGetCommandHan
async fn handle(self) -> Result<()> {
match self.command {
SonarrGetCommand::AllIndexerSettings => {
execute_network_event!(self, SonarrEvent::GetAllIndexerSettings);
}
SonarrGetCommand::EpisodeDetails { episode_id } => {
execute_network_event!(self, SonarrEvent::GetEpisodeDetails(Some(episode_id)));
}