From 87e50e713fe1e7af334232f66a16f50703b2daff Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Mon, 19 Feb 2024 22:20:55 -0500 Subject: [PATCH] Add a TODO --- .../Services/LoungeService/LoungeVideoQueue.bs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs b/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs index 96971834..03ee5b56 100644 --- a/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs +++ b/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs @@ -77,6 +77,16 @@ namespace LoungeVideoQueue end if if StringUtils.IsNullOrEmpty(videoId) + ' TODO:P1 - Handle the case where a video is removed from the queue + ' with an index lower than the current index. In this case, the + ' video queue index is not updated, and we end up highlighting the wrong + ' video in the queue (the next video in the queue is highlighted instead of + ' the video that was previously highlighted). This also leads to skipping + ' a video that's supposed to play next. + ' When a video is removed from the queue: + ' - There's no videoId + ' - There's no currentIndex + ' - eventDetails is of the form {"eventType":"VIDEO_REMOVED","videoId":""} eventDetails = playlistData[FIELD_EVENT_DETAILS] if IsString(eventDetails) eventDetails = ParseJson(eventDetails)