mirror of
https://github.com/ksyasuda/mpv-youtube-queue.git
synced 2024-10-28 04:44:11 -07:00
Compare commits
3 Commits
654e369940
...
bfb7988c70
Author | SHA1 | Date | |
---|---|---|---|
|
bfb7988c70 | ||
|
1bd0aa7c58 | ||
4ad1974e64 |
@ -51,6 +51,8 @@ local options = {
|
||||
show_errors = false
|
||||
}
|
||||
|
||||
mp.options.read_options(options, "mpv-youtube-queue")
|
||||
|
||||
local colors = {
|
||||
error = "676EFF",
|
||||
selected = "F993BD",
|
||||
@ -80,8 +82,6 @@ local style = {
|
||||
transparent .. "}"
|
||||
}
|
||||
|
||||
mp.options.read_options(options, "mpv-youtube-queue")
|
||||
|
||||
local display_limit = options.display_limit
|
||||
local display_offset = 0
|
||||
|
||||
@ -406,12 +406,14 @@ function YouTubeQueue.add_to_queue(url)
|
||||
return
|
||||
end
|
||||
end
|
||||
if not string.match(url, "^https://www.youtube.com") then
|
||||
print_osd_message("URL is not a valid YouTube URL", MSG_DURATION,
|
||||
style.error)
|
||||
return
|
||||
end
|
||||
if YouTubeQueue.is_in_queue(url) then
|
||||
print_osd_message("Video already in queue.", MSG_DURATION, style.error)
|
||||
return
|
||||
-- elseif not is_valid_ytdlp_url(url) then
|
||||
-- mp.osd_message("Invalid URL.")
|
||||
-- return
|
||||
end
|
||||
local channel_url, channel_name, video_name = get_video_info(url)
|
||||
if (channel_url == nil or channel_name == nil or video_name == nil) or
|
||||
|
Loading…
Reference in New Issue
Block a user