更新 'SrcJyPublic.js'

master
src48597962 8 months ago
parent 06a3741224
commit 02fd3344e5
  1. 20
      SrcJyPublic.js

@ -1,4 +1,10 @@
let cfgfile = "hiker://files/rules/Src/Juying2/config.json"; let rulepath = "hiker://files/rules/Src/Juying2/"; //规则文件路径
let datapath = "hiker://files/data2/" + MY_RULE.title + "/"; //数据文件路径
let cachepath = "hiker://files/cache/src/Juying2/"; //缓存文件路径
let jkfile = rulepath + "jiekou.json";
let jxfile = rulepath + "jiexi.json";
let cfgfile = rulepath + "config.json";
let Juconfig= {}; let Juconfig= {};
let Jucfg=fetch(cfgfile); let Jucfg=fetch(cfgfile);
if(Jucfg != ""){ if(Jucfg != ""){
@ -8,20 +14,14 @@ if(Jucfg != ""){
writeFile(cfgfile, JSON.stringify(Juconfig)); writeFile(cfgfile, JSON.stringify(Juconfig));
} }
let timeout = 6000;
let homeSource = Juconfig['homeSource'] || {}; let homeSource = Juconfig['homeSource'] || {};
let sourceType = homeSource.type; let sourceType = homeSource.type;
let sourceName = homeSource.name; let sourceName = homeSource.name;
let sourceGroup = homeSource.group || homeSource.type; let sourceGroup = homeSource.group || homeSource.type;
let sourceUrl = homeSource.url; let sourceUrl = homeSource.url;
let rulepath = "hiker://files/rules/Src/Juying2/"; //规则文件路径 globalMap0.putMyVar('gmParams',{rulepath:rulepath,datapath:datapath,cachepath:cachepath,jkfile:jkfile,jxfile:jxfile,cfgfile:cfgfile});
let datapath = "hiker://files/data2/" + MY_RULE.title + "/"; //数据文件路径
let cachepath = "hiker://files/cache/src/Juying2/"; //缓存文件路径
let jkfile = rulepath + "jiekou.json";
let jxfile = rulepath + "jiexi.json";
let timeout = 6000;
globalMap0.putMyVar('gmParams',{rulepath:rulepath,datapath:datapath,cachepath:cachepath,jkfile:jkfile,jxfile:jxfile});
function getFile(lx) { function getFile(lx) {
let file = lx=='jk'?jkfile:jxfile; let file = lx=='jk'?jkfile:jxfile;
@ -90,7 +90,7 @@ function deleteData(lx, data){
} }
dellist.forEach(it => { dellist.forEach(it => {
if(lx=='jk' && it.url.includes('hiker://files/data')){ if(lx=='jk' && it.url.includes(datapath)){
deleteFile(it.url); deleteFile(it.url);
} }
let dataurl = lx=='jk'?it.url:it.parse; let dataurl = lx=='jk'?it.url:it.parse;

Loading…
Cancel
Save