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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user