|
|
|
@ -331,7 +331,6 @@ function LiveSet() { |
|
|
|
|
}else if(input=="导入聚影√"){ |
|
|
|
|
showLoading('叠加导入直播,最大万行限制'); |
|
|
|
|
let YChtml = readFile('live'+md5(url)+'.txt')||request(url,{timeout:2000}).replace(/TV-/g,'TV').replace(/\[.*\]/g,''); |
|
|
|
|
log(YChtml.slice(0,100)) |
|
|
|
|
if(YChtml.indexOf('#genre#')>-1){ |
|
|
|
|
if(!fileExist('live'+md5(url)+'.txt')){ |
|
|
|
|
saveFile('live'+md5(url)+'.txt',YChtml); |
|
|
|
@ -340,9 +339,7 @@ function LiveSet() { |
|
|
|
|
}else{ |
|
|
|
|
var YClives = []; |
|
|
|
|
} |
|
|
|
|
log(YClives.length) |
|
|
|
|
if(YClives.length>0){ |
|
|
|
|
let importnum = 0; |
|
|
|
|
let livefile = "hiker://files/rules/Src/Juying/live.txt"; |
|
|
|
|
let JYlive=fetch(livefile); |
|
|
|
|
if(JYlive){ |
|
|
|
@ -362,9 +359,7 @@ function LiveSet() { |
|
|
|
|
py = 0; |
|
|
|
|
}else if(YClives[i].indexOf(',')>-1&&!JYlives.some(item => item.split(',')[1]==YClives[i].split(',')[1])&&YClives[i].trim()!=""){ |
|
|
|
|
JYlives.splice(id, py, YClives[i]); |
|
|
|
|
log(JYlives.some(item => item.split(',')[1]==YClives[i].split(',')[1])); |
|
|
|
|
py++; |
|
|
|
|
importnum++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -373,10 +368,10 @@ function LiveSet() { |
|
|
|
|
} |
|
|
|
|
writeFile(livefile, JYlives.join('\n')); |
|
|
|
|
hideLoading(); |
|
|
|
|
if(importnum>0){ |
|
|
|
|
if(JYlives.length>0){ |
|
|
|
|
putMyVar('isEdit','1'); |
|
|
|
|
} |
|
|
|
|
return "toast://成功导入"+importnum; |
|
|
|
|
return "toast://成功导入"+JYlives.length; |
|
|
|
|
}else{ |
|
|
|
|
return "toast://文件异常,导入失败"; |
|
|
|
|
} |
|
|
|
|