Changement du mécanisme d'attention sur les channels Radio Paradise.

This commit is contained in:
2025-11-29 14:19:16 +01:00
parent cf3f0afde4
commit 0a03f72467
44 changed files with 564 additions and 231 deletions

View File

@@ -17,7 +17,10 @@ impl UpnpTyped for Argument {
impl UpnpObject for Argument {
fn to_xml_element(&self) -> Element {
// Compat: retourne le premier argument (utile si consommé isolément)
self.to_xml_elements().into_iter().next().unwrap_or_else(|| Element::new("argument"))
self.to_xml_elements()
.into_iter()
.next()
.unwrap_or_else(|| Element::new("argument"))
}
}

View File

@@ -318,12 +318,14 @@ impl UpnpServerExt for Server {
// API playlists (SSE + OpenAPI)
#[cfg(feature = "server")]
{
use pmoplaylist::{playlist_events_router, openapi::ApiDoc};
use pmoplaylist::{openapi::ApiDoc, playlist_events_router};
// SSE /api/playlists/events
self.add_router("/api/playlists", playlist_events_router()).await;
self.add_router("/api/playlists", playlist_events_router())
.await;
// OpenAPI pour playlists
let openapi = ApiDoc::openapi();
self.add_openapi(axum::Router::new(), openapi, "playlists").await;
self.add_openapi(axum::Router::new(), openapi, "playlists")
.await;
}
// Enregistrer le cache dans le registre global