feat(qbzd): audio settings API + remote settings routing (Phase 5e)
Daemon: 5 new audio settings endpoints: - GET /api/audio/settings (full settings) - PATCH /api/audio/settings (partial update) - GET /api/audio/backends (available backends) - GET /api/audio/devices?backend= (devices for backend) - GET /api/audio/hardware-status (current hw state) Frontend: commandRouter gains audio settings commands that route to daemon API when in remote mode, local invoke when local. Total daemon endpoints: 32. cc
This commit is contained in:
4 files changed
+201
-2
No files matched your search
@@ -333,8 +333,8 @@ macro_rules! with_daemon {
|
||||
|
||||
/// Build the Axum HTTP router.
|
||||
fn build_router(daemon: Arc<DaemonCore>) -> axum::Router {
|
||||
use axum::routing::{get, post};
|
||||
use crate::api::{playback, queue, search, catalog};
|
||||
use axum::routing::{get, post, patch};
|
||||
use crate::api::{audio, playback, queue, search, catalog};
|
||||
|
||||
axum::Router::new()
|
||||
// System
|
||||
@@ -369,6 +369,12 @@ fn build_router(daemon: Arc<DaemonCore>) -> axum::Router {
|
||||
.route("/api/artists/{id}", get(with_daemon!(daemon, catalog::get_artist, path)))
|
||||
.route("/api/tracks/{id}", get(with_daemon!(daemon, catalog::get_track, path)))
|
||||
.route("/api/tracks/batch", get(with_daemon!(daemon, catalog::get_tracks_batch, query)))
|
||||
// Audio settings
|
||||
.route("/api/audio/settings", get(with_daemon!(daemon, audio::get_settings)))
|
||||
.route("/api/audio/settings", patch(with_daemon!(daemon, audio::update_settings, json)))
|
||||
.route("/api/audio/backends", get(with_daemon!(daemon, audio::get_backends)))
|
||||
.route("/api/audio/devices", get(with_daemon!(daemon, audio::get_devices, query)))
|
||||
.route("/api/audio/hardware-status", get(with_daemon!(daemon, audio::get_hardware_status)))
|
||||
}
|
||||
|
||||
async fn ping_handler() -> &'static str {
|
||||
|
||||
Reference in new issue
Block a user