fix(radarr): Construct and pass the edit movie parameters alongside the EditMovie event when publishing to the networking channel

This commit is contained in:
2024-12-17 17:50:07 -07:00
parent 77b8b61079
commit 9a9b13d604
7 changed files with 232 additions and 146 deletions
+2 -1
View File
@@ -484,12 +484,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, RadarrEditCommand> for RadarrEditCommandH
quality_profile_id,
root_folder_path,
tags: tag,
tag_input_string: None,
clear_tags,
};
self
.network
.handle_network_event(RadarrEvent::EditMovie(Some(edit_movie_params)).into())
.handle_network_event(RadarrEvent::EditMovie(edit_movie_params).into())
.await?;
"Movie Updated".to_owned()
}
+6 -3
View File
@@ -1330,13 +1330,14 @@ mod tests {
quality_profile_id: Some(1),
root_folder_path: Some("/nfs/test".to_owned()),
tags: Some(vec![1, 2]),
tag_input_string: None,
clear_tags: false,
};
let mut mock_network = MockNetworkTrait::new();
mock_network
.expect_handle_network_event()
.with(eq::<NetworkEvent>(
RadarrEvent::EditMovie(Some(expected_edit_movie_params)).into(),
RadarrEvent::EditMovie(expected_edit_movie_params).into(),
))
.times(1)
.returning(|_| {
@@ -1372,13 +1373,14 @@ mod tests {
quality_profile_id: Some(1),
root_folder_path: Some("/nfs/test".to_owned()),
tags: Some(vec![1, 2]),
tag_input_string: None,
clear_tags: false,
};
let mut mock_network = MockNetworkTrait::new();
mock_network
.expect_handle_network_event()
.with(eq::<NetworkEvent>(
RadarrEvent::EditMovie(Some(expected_edit_movie_params)).into(),
RadarrEvent::EditMovie(expected_edit_movie_params).into(),
))
.times(1)
.returning(|_| {
@@ -1414,13 +1416,14 @@ mod tests {
quality_profile_id: Some(1),
root_folder_path: Some("/nfs/test".to_owned()),
tags: Some(vec![1, 2]),
tag_input_string: None,
clear_tags: false,
};
let mut mock_network = MockNetworkTrait::new();
mock_network
.expect_handle_network_event()
.with(eq::<NetworkEvent>(
RadarrEvent::EditMovie(Some(expected_edit_movie_params)).into(),
RadarrEvent::EditMovie(expected_edit_movie_params).into(),
))
.times(1)
.returning(|_| {