fix(cast): localize UPnP URL compatibility and harden crash diagnostics
Keep http 1.5 and tolerate empty or relative service URLs in a local rupnp patch. Cover standard DLNA SOAP requests and malformed descriptions. Avoid logger locks in fatal handlers, flush emitted log batches, and preserve CI symbols after smoke failures. cx
This commit is contained in:
35 files changed
+2990
-264
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
use rupnp::{http::Uri, ssdp::URN, Device};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), rupnp::Error> {
|
||||
let url = Uri::from_static("http://192.168.178.40:1400/xml/device_description.xml");
|
||||
let service_urn = URN::service("schemas-upnp-org", "RenderingControl", 1);
|
||||
|
||||
let device = Device::from_url(url).await?;
|
||||
let service = device.find_service(&service_urn).unwrap();
|
||||
|
||||
let args = "<InstanceID>0</InstanceID><Channel>Master</Channel>";
|
||||
let response: u8 = service
|
||||
.action(device.url(), "GetVolume", args)
|
||||
.await?
|
||||
.get("CurrentVolume")
|
||||
.unwrap()
|
||||
.parse()
|
||||
.map_err(rupnp::Error::invalid_response)?;
|
||||
|
||||
println!("{response}");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in new issue
Block a user