mirror of
https://github.com/mpv-player/mpv
synced 2025-01-27 10:03:32 +00:00
ytdl_hook.lua: lower case URLs for exclude matching
This commit is contained in:
parent
28a4e19a67
commit
92403a068c
@ -907,6 +907,8 @@ Program Behavior
|
||||
should use ``%`` before any of the characters ``^$()%|,.[]*+-?`` to
|
||||
match that character.
|
||||
|
||||
URLs are converted to lower case before matching.
|
||||
|
||||
.. admonition:: Examples
|
||||
|
||||
- ``--script-opts=ytdl_hook-exclude='^youtube%.com'``
|
||||
|
@ -291,7 +291,7 @@ local function is_blacklisted(url)
|
||||
end
|
||||
end
|
||||
if #ytdl.blacklisted > 0 then
|
||||
url = url:match('https?://(.+)')
|
||||
url = url:match('https?://(.+)'):lower()
|
||||
for _, exclude in ipairs(ytdl.blacklisted) do
|
||||
if url:match(exclude) then
|
||||
msg.verbose('URL matches excluded substring. Skipping.')
|
||||
|
Loading…
Reference in New Issue
Block a user