From 59470dcce79ce287025be785551bf315aa0d2653 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Fri, 22 Jul 2022 04:09:51 +0000 Subject: [PATCH] update SrcJyXunmi.js. --- SrcJyXunmi.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/SrcJyXunmi.js b/SrcJyXunmi.js index 7ed3507e..907b26da 100644 --- a/SrcJyXunmi.js +++ b/SrcJyXunmi.js @@ -22,7 +22,13 @@ function xunmi(name,data) { eval("var JYconfig=" + Juyingcfg+ ";"); } if(JYconfig.TVBoxDY){ - var dyhtml = fetchCache(JYconfig.TVBoxDY,48, { timeout:2000 }); + let TVBoxDY = JYconfig.TVBoxDY; + if(/\/storage\/emulated\//.test(TVBoxDY)){TVBoxDY = "file://" + TVBoxDY} + if(/^http/.test(TVBoxDY)){ + var dyhtml = fetchCache(TVBoxDY,48, { timeout:2000 }); + }else{ + var dyhtml = fetch(TVBoxDY); + } var reg = /("([^\\\"]*(\\.)?)*")|('([^\\\']*(\\.)?)*')|(\/{2,}.*?(\r|\n|$))|(\/\*(\n|.)*?\*\/)/g; dyhtml = dyhtml.replace(reg, function(word) { return /^\/{2,}/.test(word) || /^\/\*/.test(word) ? "" : word; @@ -43,7 +49,15 @@ function xunmi(name,data) { } if(/^csp_XBiubiu/.test(dyjiekou[i].api)){ try{ - let biuhtml = fetchCache(dyjiekou[i].ext,48,{timeout:2000}); + let urlfile = dyjiekou[i].ext; + if(/^clan:/.test(urlfile)){ + urlfile = urlfile.replace("clan://TVBox/",TVBoxDY.match(/file.*\//)[0]); + } + if(/^http/.test(urlfile)){ + let biuhtml = fetchCache(urlfile,48,{timeout:2000}); + }else{ + let biuhtml = fetch(urlfile); + } biuhtml = biuhtml.replace(reg, function(word) { return /^\/{2,}/.test(word) || /^\/\*/.test(word) ? "" : word; }).replace(/^.*#.*$/mg,"");