更新 'SrcJySet.js'

pull/1/head
src48597962 2 years ago
parent 3052202f91
commit 8aec198a47
  1. 160
      SrcJySet.js

@ -1732,85 +1732,95 @@ function jiexi(lx,data) {
onChange: 'putMyVar("parseurl",input)' onChange: 'putMyVar("parseurl",input)'
} }
}); });
function selectfrom(lx,oldfrom){
let priorfrom = getMyVar('priorfrom', data&&data.priorfrom?data.priorfrom:""); addListener("onClose", $.toString(() => {
d.push({ clearMyVar('selectfrom');
title:'优先片源:' + priorfrom, }));
col_type: 'text_1', var d = [];
url:$('hiker://empty#noRecordHistory##noHistory#').rule((priorfrom) => { d.push({
var d = []; title: lx=="prior"?'优先片源标识不为空时,优先级在上次优先之后':'排除对应片源后,解析将不再调用',
d.push({ col_type: "rich_text"
title: '优先片源标识不为空时,优先级在上次优先之后', });
col_type: "rich_text" d.push({
}); col_type: "line"
d.push({ });
col_type: "line" d.push({
}); title:lx=="prior"?'优先片源':'排除片源',
d.push({ col_type: 'input',
title:'优先片源', desc: getMyVar('selectfrom',oldfrom),
col_type: 'input', extra: {
desc: getMyVar('priorfrom',''), titleVisible: false,
extra: { defaultValue: getMyVar('selectfrom', oldfrom),
titleVisible: false, onChange: 'putMyVar("selectfrom",input)'
defaultValue: getMyVar('priorfrom', priorfrom),
onChange: 'putMyVar("priorfrom",input)'
}
});
d.push({
title: '选择需要优先的片源标识>',
col_type: "rich_text"
});
d.push({
col_type: "line_blank"
});
var recordfile = "hiker://files/rules/Src/Juying/parse.json";
var recordparse=fetch(recordfile);
if(recordparse!=""){
eval("var recordlist=" + recordparse+ ";");
}else{
var recordlist={};
} }
var froms = recordlist.from || ['youku','mgtv','iqiyi','qq']; });
for(var i in froms){ d.push({
d.push({ title: '选择对应的片源标识>',
title:froms[i], col_type: "rich_text"
col_type:'text_4', });
url: $('#noLoading#').lazyRule((from)=>{ d.push({
let priorfrom = getMyVar('priorfrom','')?getMyVar('priorfrom','').replace(/,|,/g,",").split(','):[]; col_type: "line_blank"
if(priorfrom.indexOf(from)==-1){ });
priorfrom.push(from); var recordfile = "hiker://files/rules/Src/Juying/parse.json";
var sm = '选择优先>'+from; var recordparse=fetch(recordfile);
}else{ if(recordparse!=""){
function removeByValue(arr, val) { eval("var recordlist=" + recordparse+ ";");
for(var i = 0; i < arr.length; i++) { }else{
if(arr[i] == val) { var recordlist={};
arr.splice(i, 1); }
break; var froms = recordlist.from || ['youku','mgtv','iqiyi','qq'];
} for(var i in froms){
d.push({
title:froms[i],
col_type:'text_4',
url: $('#noLoading#').lazyRule((from)=>{
let selectfrom = getMyVar('selectfrom')?getMyVar('selectfrom','').replace(/,|,/g,",").split(','):[];
if(selectfrom.indexOf(from)==-1){
selectfrom.push(from);
var sm = '选择片源>'+from;
}else{
function removeByValue(arr, val) {
for(var i = 0; i < arr.length; i++) {
if(arr[i] == val) {
arr.splice(i, 1);
break;
} }
} }
removeByValue(priorfrom,from);
var sm = '删除优先>'+from;
} }
putMyVar('priorfrom',priorfrom.join(',')); removeByValue(selectfrom,from);
refreshPage(false); var sm = '删除片源>'+from;
return 'toast://'+sm; }
}, froms[i]) putMyVar('selectfrom',selectfrom.join(','));
}) refreshPage(false);
} return 'toast://'+sm;
d.push({ }, froms[i])
col_type: "line_blank" })
}); }
d.push({ d.push({
title:'选择好了,点此返回', col_type: "line_blank"
col_type:'text_center_1', });
url: $('#noLoading#').lazyRule(()=>{ d.push({
back(true); title:'选择好了,点此返回',
return "hiker://empty"; col_type:'text_center_1',
}) url: $('#noLoading#').lazyRule((lx)=>{
}); if(lx=="prior"){
setHomeResult(d); putMyVar('priorfrom',getMyVar('selectfrom',''));
},priorfrom) }else{
putMyVar('stopfrom',getMyVar('selectfrom',''));
}
back(true);
return "hiker://empty";
},lx)
});
setHomeResult(d);
}
let priorfrom = getMyVar('priorfrom', data&&data.priorfrom?data.priorfrom:"");
d.push({
title:'优先片源:' + priorfrom,
col_type: 'text_1',
url:$('hiker://empty#noRecordHistory##noHistory#').rule((selectfrom,lx,oldfrom) => {
selectfrom(lx,oldfrom);
},selectfrom,'prior',priorfrom)
}); });
let stopfrom = getMyVar('stopfrom', lx=="update"?data.stopfrom:""); let stopfrom = getMyVar('stopfrom', lx=="update"?data.stopfrom:"");
d.push({ d.push({

Loading…
Cancel
Save