mirror of https://github.com/kenzok8/small.git
update 2024-12-10 20:28:16
This commit is contained in:
parent
c365413bd3
commit
5294fd43e5
|
@ -278,8 +278,20 @@ if api.fs.access(gfwlist_path) then
|
|||
o.rows = 45
|
||||
o.wrap = "off"
|
||||
o.cfgvalue = function(self, section)
|
||||
return fs.readfile(gfwlist_path) or ""
|
||||
local limit = 100 -- 限制行数
|
||||
local cmd = string.format("head -n %d %s", limit, gfwlist_path)
|
||||
return api.sys.exec(cmd) or ""
|
||||
-- return fs.readfile(gfwlist_path) or ""
|
||||
end
|
||||
local total_lines_cmd = string.format("wc -l < %s", gfwlist_path)
|
||||
local total_lines = tonumber(api.sys.exec(total_lines_cmd)) or 0
|
||||
local displayed_lines = 100
|
||||
|
||||
local total_lines_label = s:taboption("gfw_list", DummyValue, "total_lines", translate("Total Lines"))
|
||||
total_lines_label.value = translatef("%d lines", total_lines)
|
||||
|
||||
local displayed_lines_label = s:taboption("gfw_list", DummyValue, "displayed_lines", translate("Displayed Lines"))
|
||||
displayed_lines_label.value = translatef("%d lines", displayed_lines)
|
||||
end
|
||||
|
||||
if api.fs.access(chnlist_path) then
|
||||
|
@ -289,8 +301,20 @@ if api.fs.access(chnlist_path) then
|
|||
o.rows = 45
|
||||
o.wrap = "off"
|
||||
o.cfgvalue = function(self, section)
|
||||
return fs.readfile(chnlist_path) or ""
|
||||
local limit = 100 -- 限制行数
|
||||
local cmd = string.format("head -n %d %s", limit, chnlist_path)
|
||||
return api.sys.exec(cmd) or ""
|
||||
-- return fs.readfile(chnlist_path) or ""
|
||||
end
|
||||
local total_lines_cmd = string.format("wc -l < %s", chnlist_path)
|
||||
local total_lines = tonumber(api.sys.exec(total_lines_cmd)) or 0
|
||||
local displayed_lines = 100
|
||||
|
||||
local total_lines_label = s:taboption("chn_list", DummyValue, "total_lines", translate("Total Lines"))
|
||||
total_lines_label.value = translatef("%d lines", total_lines)
|
||||
|
||||
local displayed_lines_label = s:taboption("chn_list", DummyValue, "displayed_lines", translate("Displayed Lines"))
|
||||
displayed_lines_label.value = translatef("%d lines", displayed_lines)
|
||||
end
|
||||
|
||||
if api.fs.access(chnroute_path) then
|
||||
|
@ -300,8 +324,20 @@ if api.fs.access(chnroute_path) then
|
|||
o.rows = 45
|
||||
o.wrap = "off"
|
||||
o.cfgvalue = function(self, section)
|
||||
return fs.readfile(chnroute_path) or ""
|
||||
local limit = 100 -- 限制行数
|
||||
local cmd = string.format("head -n %d %s", limit, chnroute_path)
|
||||
return api.sys.exec(cmd) or ""
|
||||
-- return fs.readfile(chnroute_path) or ""
|
||||
end
|
||||
local total_lines_cmd = string.format("wc -l < %s", chnroute_path)
|
||||
local total_lines = tonumber(api.sys.exec(total_lines_cmd)) or 0
|
||||
local displayed_lines = 100
|
||||
|
||||
local total_lines_label = s:taboption("chnroute_list", DummyValue, "total_lines", translate("Total Lines"))
|
||||
total_lines_label.value = translatef("%d lines", total_lines)
|
||||
|
||||
local displayed_lines_label = s:taboption("chnroute_list", DummyValue, "displayed_lines", translate("Displayed Lines"))
|
||||
displayed_lines_label.value = translatef("%d lines", displayed_lines)
|
||||
end
|
||||
|
||||
m:append(Template(appname .. "/rule_list/js"))
|
||||
|
|
|
@ -1725,3 +1725,12 @@ msgstr "与使用 %s 节点时生效。"
|
|||
|
||||
msgid "Set the default domain resolution strategy for the sing-box node."
|
||||
msgstr "为 sing-box 节点设置默认的域名解析策略。"
|
||||
|
||||
msgid "Total Lines"
|
||||
msgstr "总行数:"
|
||||
|
||||
msgid "Displayed Lines"
|
||||
msgstr "展示行数:"
|
||||
|
||||
msgid "%d lines"
|
||||
msgstr "%d 行"
|
||||
|
|
|
@ -30,13 +30,13 @@ define Download/geosite
|
|||
HASH:=e414da6132d8b406827b827f246c3fe9759530d61f191b866836fe4d0a7b13a4
|
||||
endef
|
||||
|
||||
GEOSITE_IRAN_VER:=202412090039
|
||||
GEOSITE_IRAN_VER:=202412101148
|
||||
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
|
||||
define Download/geosite-ir
|
||||
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
|
||||
URL_FILE:=iran.dat
|
||||
FILE:=$(GEOSITE_IRAN_FILE)
|
||||
HASH:=28ff3c2ca01880ab5e0cc405afd55f42864da6cf1276bd89adbe704c6d28266c
|
||||
HASH:=b4a5bd7a6d981ac900798764bdeeb87525576ed64f687b50fe4fb0e72593c016
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/template
|
||||
|
|
Loading…
Reference in New Issue