summaryrefslogtreecommitdiffstats
path: root/player/lua/ytdl_hook.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua/ytdl_hook.lua')
-rw-r--r--player/lua/ytdl_hook.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index d950779f01..0656f01998 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -193,11 +193,8 @@ end
local function is_blacklisted(url)
if o.exclude == "" then return false end
if #ytdl.blacklisted == 0 then
- local joined = o.exclude
- while joined:match('%|?[^|]+') do
- local _, e, substring = joined:find('%|?([^|]+)')
- table.insert(ytdl.blacklisted, substring)
- joined = joined:sub(e+1)
+ for match in o.exclude:gmatch('%|?([^|]+)') do
+ ytdl.blacklisted[#ytdl.blacklisted + 1] = match
end
end
if #ytdl.blacklisted > 0 then