mirror of
https://github.com/ksyasuda/mpv-youtube-queue.git
synced 2024-11-22 03:19:54 -08:00
fix update_current_index
This commit is contained in:
parent
d41d85b0e3
commit
14e57bd9b4
@ -218,13 +218,13 @@ function YouTubeQueue.update_current_index()
|
|||||||
for i, v in ipairs(video_queue) do
|
for i, v in ipairs(video_queue) do
|
||||||
if v.video_url == current_url then
|
if v.video_url == current_url then
|
||||||
index = i
|
index = i
|
||||||
|
selected_index = index
|
||||||
|
current_video = YouTubeQueue.get_video_at(index)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- if not found, reset the index
|
-- if not found, reset the index
|
||||||
index = 0
|
index = 0
|
||||||
selected_index = index
|
|
||||||
current_video = YouTubeQueue.get_video_at(index)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Function to be called when the end-file event is triggered
|
-- Function to be called when the end-file event is triggered
|
||||||
|
Loading…
Reference in New Issue
Block a user