Des debug après la simplification

This commit is contained in:
2025-12-06 00:38:06 +01:00
parent daef8d6150
commit 380e105873
16 changed files with 800 additions and 668 deletions

View File

@@ -4,6 +4,7 @@
import type {
RendererSummary,
RendererState,
FullRendererSnapshot,
QueueSnapshot,
AttachedPlaylistInfo,
MediaServerSummary,
@@ -68,6 +69,14 @@ class PMOControlAPI {
return this.request<RendererState>(`/renderers/${encodeURIComponent(id)}`)
}
/**
* Récupère le snapshot complet d'un renderer
* GET /api/control/renderers/{id}/full
*/
async getRendererFullSnapshot(id: string): Promise<FullRendererSnapshot> {
return this.request<FullRendererSnapshot>(`/renderers/${encodeURIComponent(id)}/full`)
}
/**
* Récupère la queue d'un renderer (avec current_index)
* GET /api/control/renderers/{id}/queue
@@ -195,9 +204,14 @@ class PMOControlAPI {
async attachPlaylist(
rendererId: string,
serverId: string,
containerId: string
containerId: string,
autoPlay = false
): Promise<SuccessResponse> {
const payload: AttachPlaylistRequest = { server_id: serverId, container_id: containerId }
const payload: AttachPlaylistRequest = {
server_id: serverId,
container_id: containerId,
auto_play: autoPlay,
}
return this.request<SuccessResponse>(`/renderers/${encodeURIComponent(rendererId)}/binding/attach`, {
method: 'POST',
body: JSON.stringify(payload),

View File

@@ -77,6 +77,12 @@ export interface QueueSnapshot {
current_index: number | null // Index de la piste en cours (null si rien en lecture)
}
export interface FullRendererSnapshot {
state: RendererState
queue: QueueSnapshot
binding: AttachedPlaylistInfo | null
}
// ============================================================================
// OPENHOME PLAYLIST
// ============================================================================
@@ -141,6 +147,7 @@ export interface VolumeSetRequest {
export interface AttachPlaylistRequest {
server_id: string
container_id: string
auto_play?: boolean
}
export interface PlayContentRequest {