mirror of
https://github.com/ksyasuda/mpv-youtube-queue.git
synced 2024-10-28 04:44:11 -07:00
modify script to automatically play first video added to queue
This commit is contained in:
parent
0fd4673029
commit
a77ad04f41
@ -243,8 +243,12 @@ local function play_next_in_queue()
|
|||||||
end
|
end
|
||||||
local next_video_url = next_video.url
|
local next_video_url = next_video.url
|
||||||
print_video_name(next_video)
|
print_video_name(next_video)
|
||||||
|
if YouTubeQueue.size() > 1 then
|
||||||
mp.commandv("loadfile", next_video_url, "append-play")
|
mp.commandv("loadfile", next_video_url, "append-play")
|
||||||
mp.set_property_number("playlist-pos", YouTubeQueue.get_current_index())
|
mp.set_property_number("playlist-pos", YouTubeQueue.get_current_index())
|
||||||
|
else
|
||||||
|
mp.commandv("loadfile", next_video_url, "replace")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add the video to the queue from the clipboard
|
-- add the video to the queue from the clipboard
|
||||||
|
Loading…
Reference in New Issue
Block a user