fix(qbzd): immediate renderer join in bootstrap, don't wait for SESSION_STATE
The Qobuz server doesn't always send SESSION_STATE after a controller JoinSession (only on topology changes). This left the daemon invisible as a renderer because deferred_renderer_join never triggered. Now: renderer join happens immediately in bootstrap after a 1s delay, using null session_uuid. The server should assign one. If a SESSION_STATE arrives later via the sink channel, a second join is attempted with the real uuid. cc
This commit is contained in:
1 file changed
+7
-1
@@ -205,6 +205,12 @@ async fn bootstrap_remote_presence(app: &Arc<App>, device_name: &str) -> Result<
|
|||||||
}
|
}
|
||||||
|
|
||||||
log::info!("[qbzd/qconnect] Bootstrap: controller joined, queue requested");
|
log::info!("[qbzd/qconnect] Bootstrap: controller joined, queue requested");
|
||||||
|
|
||||||
|
// Wait a moment for server to process, then do immediate renderer join
|
||||||
|
// (without session_uuid — the server should assign one)
|
||||||
|
tokio::time::sleep(std::time::Duration::from_millis(1000)).await;
|
||||||
|
deferred_renderer_join(app, "", device_name).await;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,7 +269,7 @@ async fn deferred_renderer_join(app: &Arc<App>, session_uuid: &str, device_name:
|
|||||||
|
|
||||||
// 1. Renderer JoinSession
|
// 1. Renderer JoinSession
|
||||||
let join_payload = serde_json::json!({
|
let join_payload = serde_json::json!({
|
||||||
"session_uuid": session_uuid,
|
"session_uuid": if session_uuid.is_empty() { serde_json::Value::Null } else { serde_json::Value::String(session_uuid.to_string()) },
|
||||||
"device_info": device_info,
|
"device_info": device_info,
|
||||||
"is_active": true,
|
"is_active": true,
|
||||||
"reason": JOIN_SESSION_REASON_CONTROLLER_REQUEST,
|
"reason": JOIN_SESSION_REASON_CONTROLLER_REQUEST,
|
||||||
|
|||||||
Reference in new issue
Block a user