refactor: Refactored the SonarrEvent enum to not unnecessarily wrap dual series_id and season_number values in a tuple when both values can be passed directly

This commit is contained in:
2026-01-19 16:44:10 -07:00
parent a2e6400a38
commit f17f542e8e
19 changed files with 74 additions and 74 deletions
@@ -279,8 +279,9 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeasonDetailsHandler
}
ActiveSonarrBlock::AutomaticallySearchSeasonPrompt => {
if self.app.data.sonarr_data.prompt_confirm {
let (series_id, season_number) = self.extract_series_id_season_number_tuple();
self.app.data.sonarr_data.prompt_confirm_action = Some(
SonarrEvent::TriggerAutomaticSeasonSearch(self.extract_series_id_season_number_tuple()),
SonarrEvent::TriggerAutomaticSeasonSearch(series_id, season_number),
);
}
@@ -404,8 +405,9 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeasonDetailsHandler
},
ActiveSonarrBlock::AutomaticallySearchSeasonPrompt if matches_key!(confirm, key) => {
self.app.data.sonarr_data.prompt_confirm = true;
let (series_id, season_number) = self.extract_series_id_season_number_tuple();
self.app.data.sonarr_data.prompt_confirm_action = Some(
SonarrEvent::TriggerAutomaticSeasonSearch(self.extract_series_id_season_number_tuple()),
SonarrEvent::TriggerAutomaticSeasonSearch(series_id, season_number),
);
self.app.pop_navigation_stack();