mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
parent
36351e8548
commit
027c4e7c49
1 changed files with 10 additions and 8 deletions
|
@ -36,14 +36,16 @@ function create_helper_text()
|
||||||
end
|
end
|
||||||
|
|
||||||
function get_provider_name(value)
|
function get_provider_name(value)
|
||||||
for filename in fs.dir(providers_dir) do
|
if value ~= nil then
|
||||||
local p_func = loadfile(providers_dir .. filename)
|
for filename in fs.dir(providers_dir) do
|
||||||
setfenv(p_func, { _ = i18n.translate })
|
local p_func = loadfile(providers_dir .. filename)
|
||||||
local p = p_func()
|
setfenv(p_func, { _ = i18n.translate })
|
||||||
value = value:gsub('[%p%c%s]', '')
|
local p = p_func()
|
||||||
p.url_match = p.resolver_url:gsub('[%p%c%s]', '')
|
value = value:gsub('[%p%c%s]', '')
|
||||||
if value:match(p.url_match) then
|
p.url_match = p.resolver_url:gsub('[%p%c%s]', '')
|
||||||
return p.label
|
if value:match(p.url_match) then
|
||||||
|
return p.label
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return translate("Unknown Provider")
|
return translate("Unknown Provider")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue