feat(cli): Support for fetching all Sonarr history events

This commit is contained in:
2024-11-20 14:13:20 -07:00
parent 6da1ae93ef
commit 5872a6ba72
3 changed files with 62 additions and 7 deletions
+8
View File
@@ -32,6 +32,11 @@ pub enum SonarrListCommand {
)]
series_id: i64,
},
#[command(about = "Fetch all Sonarr history events")]
History {
#[arg(long, help = "How many history events to fetch", default_value_t = 500)]
events: u64,
},
#[command(about = "List all Sonarr indexers")]
Indexers,
#[command(about = "Fetch Sonarr logs")]
@@ -88,6 +93,9 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, SonarrListCommand> for SonarrListCommandH
SonarrListCommand::Episodes { series_id } => {
execute_network_event!(self, SonarrEvent::GetEpisodes(Some(series_id)));
}
SonarrListCommand::History { events: items } => {
execute_network_event!(self, SonarrEvent::GetHistory(Some(items)));
}
SonarrListCommand::Indexers => {
execute_network_event!(self, SonarrEvent::GetIndexers);
}