From 700c8f2fc9fb64ce1ebb023e9c5bd71f3d203e22 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Sun, 11 Jan 2026 00:23:32 +0100 Subject: [PATCH] Fix OpenHome client IdResponse handling and seek argument name This commit fixes two issues in the OpenHome client: 1. Improves error handling in IdResponse parsing by ensuring proper formatting of the error message 2. Corrects the argument name used in seek_second_absolute from 'Second' to 'Value' to match the expected SOAP action parameters These changes ensure proper communication with OpenHome devices and correct seeking behavior. --- pmocontrol/src/upnp_clients/openhome_client.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pmocontrol/src/upnp_clients/openhome_client.rs b/pmocontrol/src/upnp_clients/openhome_client.rs index 4d121f78..2b387dce 100644 --- a/pmocontrol/src/upnp_clients/openhome_client.rs +++ b/pmocontrol/src/upnp_clients/openhome_client.rs @@ -276,7 +276,8 @@ impl OhPlaylistClient { let envelope = ensure_success("Id", &call_result)?; - let response = find_child_with_suffix(&envelope.body.content, "IdResponse").ok_or_else(|| { + let response = + find_child_with_suffix(&envelope.body.content, "IdResponse").ok_or_else(|| { ControlPointError::OpenHomeError(format!( "Missing ReadResponse element in SOAP body" )) @@ -316,7 +317,7 @@ impl OhPlaylistClient { pub fn seek_second_absolute(&self, second: u32) -> Result<(), ControlPointError> { let second_str = second.to_string(); - let args = [("Second", second_str.as_str())]; + let args = [("Value", second_str.as_str())]; let call_result = invoke_upnp_action( &self.control_url, &self.service_type,