From b135ba2a0a6ef59fe397200c17946c50c1fbae98 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 22 Feb 2024 23:40:40 -0500 Subject: [PATCH] Log connect and disconnect events --- .../src/components/Services/LoungeService/LoungeApi.bs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/playlet-lib/src/components/Services/LoungeService/LoungeApi.bs b/playlet-lib/src/components/Services/LoungeService/LoungeApi.bs index 240fa71c..116497c9 100644 --- a/playlet-lib/src/components/Services/LoungeService/LoungeApi.bs +++ b/playlet-lib/src/components/Services/LoungeService/LoungeApi.bs @@ -57,13 +57,13 @@ class LoungeApi commandHandlers[COMMAND_TYPE_DPAD_COMMAND] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_VOICE_COMMAND] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_ON_USER_ACTIVITY] = m.HandleIgnoreCommand - commandHandlers[COMMAND_TYPE_REMOTE_DISCONNECTED] = m.HandleIgnoreCommand commandHandlers[COMMAND_TYPE_GET_NOW_PLAYING] = m.HandleGetPlayingNow commandHandlers[COMMAND_TYPE_SESSION_ID] = m.HandleSessionId commandHandlers[COMMAND_TYPE_G_SESSION_ID] = m.HandleGSessionId commandHandlers[COMMAND_TYPE_LOUNGE_STATUS] = m.HandleLoungeStatus commandHandlers[COMMAND_TYPE_REMOTE_CONNECTED] = m.HandleRemoteConnected + commandHandlers[COMMAND_TYPE_REMOTE_DISCONNECTED] = m.HandleRemoteDisconnected commandHandlers[COMMAND_TYPE_SET_VOLUME] = m.HandleSetVolume commandHandlers[COMMAND_TYPE_SET_PLAYLIST] = m.HandleSetPlaylist commandHandlers[COMMAND_TYPE_UPDATE_PLAYLIST] = m.HandleUpdatePlaylist @@ -344,7 +344,7 @@ class LoungeApi end function function HandleRemoteConnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void - LogInfo(commandType) + LogInfo(commandType, FormatJson(commandArgs)) newDevice = commandArgs id = newDevice.id if StringUtils.IsNullOrEmpty(id) @@ -366,6 +366,10 @@ class LoungeApi LoungeDeviceConnected.ShowNotifcation(m.notificationsNode, deviceName, userName, userAvatarUri) end function + function HandleRemoteDisconnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void + LogInfo(commandType, FormatJson(commandArgs)) + end function + function HandleSetVolume(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void player = m.videoQueueNode.player if player = invalid