diff --git a/crates/upnp-serve/src/http_handlers.rs b/crates/upnp-serve/src/http_handlers.rs index 5d0619d..4c9cb54 100644 --- a/crates/upnp-serve/src/http_handlers.rs +++ b/crates/upnp-serve/src/http_handlers.rs @@ -184,7 +184,7 @@ pub fn make_router( let state = UpnpServerStateInner::new(root_desc.into(), browse_provider, cancellation_token) .context("error creating UPNP server")?; - let sub_handler = { + let content_dir_sub_handler = { let state = state.clone(); move |request: axum::extract::Request| async move { subscription(State(state.clone()), request).await @@ -209,7 +209,14 @@ pub fn make_router( "/control/ConnectionManager", post(|| async { (StatusCode::NOT_IMPLEMENTED, "") }), ) - .route_service("/subscribe", sub_handler.into_service()) + .route_service( + "/subscribe/ContentDirectory", + content_dir_sub_handler.into_service(), + ) + .route( + "/subscribe/ConnectionManager", + post(|| async { (StatusCode::NOT_IMPLEMENTED, "") }), + ) .with_state(state); Ok(app) diff --git a/crates/upnp-serve/src/resources/templates/root_desc.tmpl.xml b/crates/upnp-serve/src/resources/templates/root_desc.tmpl.xml index f8a9262..3f15bbc 100644 --- a/crates/upnp-serve/src/resources/templates/root_desc.tmpl.xml +++ b/crates/upnp-serve/src/resources/templates/root_desc.tmpl.xml @@ -17,14 +17,14 @@ urn:upnp-org:serviceId:ContentDirectory {http_prefix}/scpd/ContentDirectory.xml {http_prefix}/control/ContentDirectory - {http_prefix}/subscribe + {http_prefix}/subscribe/ContentDirectory urn:schemas-upnp-org:service:ConnectionManager:1 urn:upnp-org:serviceId:ConnectionManager {http_prefix}/scpd/ConnectionManager.xml {http_prefix}/control/ConnectionManager - {http_prefix}/subscribe + {http_prefix}/subscribe/ConnectionManager /