Les playlists suivent la lecture de leurs morceaux.
This commit is contained in:
@@ -10,6 +10,7 @@ pmoutils = { path = "../pmoutils" }
|
||||
pmoserver = { path = "../pmoserver" }
|
||||
pmocovers = { path = "../pmocovers", features = ["pmoserver"] }
|
||||
pmoaudiocache = { path = "../pmoaudiocache", features = ["pmoserver"] }
|
||||
pmoplaylist = { path = "../pmoplaylist", optional = true, features = ["pmoserver"] }
|
||||
pmocache = { path = "../pmocache" }
|
||||
|
||||
url = "2.5.7"
|
||||
@@ -35,5 +36,11 @@ reqwest = "0.12.23"
|
||||
utoipa = { version = "5.3", features = ["axum_extras"] }
|
||||
socket2 = "0.5"
|
||||
|
||||
[features]
|
||||
default = ["server"]
|
||||
server = ["pmoplaylist"]
|
||||
paradise = []
|
||||
qobuz = []
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
@@ -315,6 +315,17 @@ impl UpnpServerExt for Server {
|
||||
let openapi = pmoaudiocache::ApiDoc::openapi();
|
||||
self.add_openapi(api_router, openapi, "audio").await;
|
||||
|
||||
// API playlists (SSE + OpenAPI)
|
||||
#[cfg(feature = "server")]
|
||||
{
|
||||
use pmoplaylist::{playlist_events_router, openapi::ApiDoc};
|
||||
// SSE /api/playlists/events
|
||||
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;
|
||||
}
|
||||
|
||||
// Enregistrer le cache dans le registre global
|
||||
pmoaudiocache::register_audio_cache(cache.clone());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user