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)
|
let state = UpnpServerStateInner::new(root_desc.into(), browse_provider, cancellation_token)
|
||||||
.context("error creating UPNP server")?;
|
.context("error creating UPNP server")?;
|
||||||
|
|
||||||
let sub_handler = {
|
let content_dir_sub_handler = {
|
||||||
let state = state.clone();
|
let state = state.clone();
|
||||||
move |request: axum::extract::Request| async move {
|
move |request: axum::extract::Request| async move {
|
||||||
subscription(State(state.clone()), request).await
|
subscription(State(state.clone()), request).await
|
||||||
|
|
@ -209,7 +209,14 @@ pub fn make_router(
|
||||||
"/control/ConnectionManager",
|
"/control/ConnectionManager",
|
||||||
post(|| async { (StatusCode::NOT_IMPLEMENTED, "") }),
|
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);
|
.with_state(state);
|
||||||
|
|
||||||
Ok(app)
|
Ok(app)
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@
|
||||||
<serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>
|
<serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>
|
||||||
<SCPDURL>{http_prefix}/scpd/ContentDirectory.xml</SCPDURL>
|
<SCPDURL>{http_prefix}/scpd/ContentDirectory.xml</SCPDURL>
|
||||||
<controlURL>{http_prefix}/control/ContentDirectory</controlURL>
|
<controlURL>{http_prefix}/control/ContentDirectory</controlURL>
|
||||||
<eventSubURL>{http_prefix}/subscribe</eventSubURL>
|
<eventSubURL>{http_prefix}/subscribe/ContentDirectory</eventSubURL>
|
||||||
</service>
|
</service>
|
||||||
<service>
|
<service>
|
||||||
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
|
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
|
||||||
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
|
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
|
||||||
<SCPDURL>{http_prefix}/scpd/ConnectionManager.xml</SCPDURL>
|
<SCPDURL>{http_prefix}/scpd/ConnectionManager.xml</SCPDURL>
|
||||||
<controlURL>{http_prefix}/control/ConnectionManager</controlURL>
|
<controlURL>{http_prefix}/control/ConnectionManager</controlURL>
|
||||||
<eventSubURL>{http_prefix}/subscribe</eventSubURL>
|
<eventSubURL>{http_prefix}/subscribe/ConnectionManager</eventSubURL>
|
||||||
</service>
|
</service>
|
||||||
</serviceList>
|
</serviceList>
|
||||||
<presentationURL>/</presentationURL>
|
<presentationURL>/</presentationURL>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue