Disable ConnectionManager subscription not to confuse clients
This commit is contained in:
parent
92951dcf5f
commit
5bb1fde46e
2 changed files with 11 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@
|
|||
<serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>
|
||||
<SCPDURL>{http_prefix}/scpd/ContentDirectory.xml</SCPDURL>
|
||||
<controlURL>{http_prefix}/control/ContentDirectory</controlURL>
|
||||
<eventSubURL>{http_prefix}/subscribe</eventSubURL>
|
||||
<eventSubURL>{http_prefix}/subscribe/ContentDirectory</eventSubURL>
|
||||
</service>
|
||||
<service>
|
||||
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
|
||||
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
|
||||
<SCPDURL>{http_prefix}/scpd/ConnectionManager.xml</SCPDURL>
|
||||
<controlURL>{http_prefix}/control/ConnectionManager</controlURL>
|
||||
<eventSubURL>{http_prefix}/subscribe</eventSubURL>
|
||||
<eventSubURL>{http_prefix}/subscribe/ConnectionManager</eventSubURL>
|
||||
</service>
|
||||
</serviceList>
|
||||
<presentationURL>/</presentationURL>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue