From 14e57bd9b4da59879a2d17356f476e769367a776 Mon Sep 17 00:00:00 2001 From: "ksyasuda@umich.edu" Date: Fri, 4 Aug 2023 09:02:01 -0700 Subject: [PATCH] fix update_current_index --- mpv-youtube-queue.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpv-youtube-queue.lua b/mpv-youtube-queue.lua index 778cd57..cf49d94 100644 --- a/mpv-youtube-queue.lua +++ b/mpv-youtube-queue.lua @@ -218,13 +218,13 @@ function YouTubeQueue.update_current_index() for i, v in ipairs(video_queue) do if v.video_url == current_url then index = i + selected_index = index + current_video = YouTubeQueue.get_video_at(index) return end end -- if not found, reset the index index = 0 - selected_index = index - current_video = YouTubeQueue.get_video_at(index) end -- Function to be called when the end-file event is triggered