From ce47001d27919689dd127b4fda9871ee1e1a8d5f Mon Sep 17 00:00:00 2001 From: lean Date: Wed, 18 Mar 2020 16:04:36 +0800 Subject: [PATCH] luci-app-ssr-plus: fix Netflix IP custom url update --- .../luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua index 444a4ae6e7..32ae59f69d 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua @@ -117,7 +117,11 @@ elseif set == "ip_data" then end luci.sys.exec("rm -f /tmp/china_ssr.txt ") elseif set == "nfip_data" then - refresh_cmd="wget-ssl --no-check-certificate -O - ".. luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'nfip_url','https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt') .." > /tmp/netflixip.list" + if (luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'netflix', '0') == '1') then + refresh_cmd="wget-ssl --no-check-certificate -O - ".. luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'nfip_url', 'https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt') .." > /tmp/netflixip.list" + else + refresh_cmd="wget-ssl --no-check-certificate -O - https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt > /tmp/netflixip.list" + end sret=luci.sys.call(refresh_cmd) icount = luci.sys.exec("cat /tmp/netflixip.list | wc -l") if sret== 0 and tonumber(icount)>1 then