fix(sonarr): Pass series ID and season number alongside all ManualSeasonSearch events when publishing to the networking channel

This commit is contained in:
2024-12-18 00:32:36 -07:00
parent f655ca989d
commit f7315a3bec
6 changed files with 28 additions and 225 deletions
+9 -1
View File
@@ -154,6 +154,14 @@ mod tests {
async fn test_dispatch_by_manual_season_search_block() {
let (mut app, mut sync_network_rx) = construct_app_unit();
app.data.sonarr_data.season_details_modal = Some(SeasonDetailsModal::default());
app.data.sonarr_data.series.set_items(vec![Series {
id: 1,
..Series::default()
}]);
app.data.sonarr_data.seasons.set_items(vec![Season {
season_number: 1,
..Season::default()
}]);
app
.dispatch_by_sonarr_block(&ActiveSonarrBlock::ManualSeasonSearch)
@@ -162,7 +170,7 @@ mod tests {
assert!(app.is_loading);
assert_eq!(
sync_network_rx.recv().await.unwrap(),
SonarrEvent::GetSeasonReleases(None).into()
SonarrEvent::GetSeasonReleases((1, 1)).into()
);
assert!(!app.data.sonarr_data.prompt_confirm);
assert_eq!(app.tick_count, 0);