Compare commits

..

No commits in common. "bfb7988c703734b828a494d7a144f3a43adf708a" and "654e3699400e9cd248f047bdacf4aafe233d0042" have entirely different histories.

View File

@ -51,8 +51,6 @@ local options = {
show_errors = false show_errors = false
} }
mp.options.read_options(options, "mpv-youtube-queue")
local colors = { local colors = {
error = "676EFF", error = "676EFF",
selected = "F993BD", selected = "F993BD",
@ -82,6 +80,8 @@ local style = {
transparent .. "}" transparent .. "}"
} }
mp.options.read_options(options, "mpv-youtube-queue")
local display_limit = options.display_limit local display_limit = options.display_limit
local display_offset = 0 local display_offset = 0
@ -406,14 +406,12 @@ function YouTubeQueue.add_to_queue(url)
return return
end end
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 if YouTubeQueue.is_in_queue(url) then
print_osd_message("Video already in queue.", MSG_DURATION, style.error) print_osd_message("Video already in queue.", MSG_DURATION, style.error)
return return
-- elseif not is_valid_ytdlp_url(url) then
-- mp.osd_message("Invalid URL.")
-- return
end end
local channel_url, channel_name, video_name = get_video_info(url) local channel_url, channel_name, video_name = get_video_info(url)
if (channel_url == nil or channel_name == nil or video_name == nil) or if (channel_url == nil or channel_name == nil or video_name == nil) or