From 188463c6a7cd83c9f3724e2c930acfbf206dbd6e Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Tue, 20 Feb 2024 22:43:02 -0500 Subject: [PATCH] queue fix --- playlet-lib/src/components/VideoQueue/VideoQueue.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playlet-lib/src/components/VideoQueue/VideoQueue.bs b/playlet-lib/src/components/VideoQueue/VideoQueue.bs index 3df96729..7c565c0d 100644 --- a/playlet-lib/src/components/VideoQueue/VideoQueue.bs +++ b/playlet-lib/src/components/VideoQueue/VideoQueue.bs @@ -236,16 +236,16 @@ function FindPlaylistVideosInQueue(videoNodes as object) as integer queueVideos = m.content.getChildren(-1, 0) ' array in array search based on node.videoId, starting from the end - for i = queueCount - 1 to playlistCount step -1 + for i = queueCount - playlistCount to 0 step -1 found = true for j = 0 to playlistCount - 1 - if queueVideos[i - j].videoId <> videoNodes[j].videoId + if queueVideos[i + j].videoId <> videoNodes[j].videoId found = false exit for end if end for if found - return i - playlistCount + 1 + return i end if end for