From f064c3dc37db7b8bcd2e631cff59240e3cf296ff Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Mon, 17 Oct 2022 16:38:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcLive.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcLive.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/SrcLive.js b/SrcLive.js index 5972c26f..eed5db87 100644 --- a/SrcLive.js +++ b/SrcLive.js @@ -5,6 +5,24 @@ function Live() { var d = []; let livefile = "hiker://files/rules/Src/Juying/live.txt"; let JYlive=fetch(livefile); + + let livecfgfile = "hiker://files/rules/Src/Juying/liveconfig.json"; + let livecfg = fetch(livecfgfile); + if(livecfg != ""){ + eval("var liveconfig = " + livecfg); + }else{ + var liveconfig = {}; + } + let livedata = liveconfig['data']||[]; + if(JYlive==""&&livedata.length>0){ + showLoading('发现订阅源,正在初始化'); + let YChtml = request(livedata[0],{timeout:2000}).replace(/TV-/g,'TV'); + if(YChtml.indexOf('#genre#')>-1){ + writeFile(livefile, YChtml); + JYlive = YChtml; + } + hideLoading(); + } if(JYlive){ var JYlives = JYlive.split('\n'); }else{