From 52063101b54ac91d6c6aeecab9811eaa59ea05ce Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 20 Oct 2022 10:26:56 +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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SrcLive.js b/SrcLive.js index 08566f6c..333b0720 100644 --- a/SrcLive.js +++ b/SrcLive.js @@ -1,10 +1,10 @@ function Live() { addListener("onClose", $.toString(() => { clearMyVar('editmode'); - clearMyVar('clearlive'); clearMyVar('JYlivenum'); clearMyVar('JYlivedyurl'); clearMyVar('selectgroup'); + clearMyVar('JYlivelocal'); })); var d = []; d.push({ @@ -28,7 +28,7 @@ function Live() { let JYlivefile = "hiker://files/rules/Src/Juying/live.txt"; let JYlive = ""; let JYlivedyurl = getMyVar('JYlivedyurl','juying'); - if(JYlivedyurl=="juying"){ + if(JYlivedyurl=="juying"&&!getMyVar('JYlivelocal')){ JYlive=fetch(JYlivefile); if(JYlive==""&&livedata.length>0){ JYlivedyurl = livedata[0].url?livedata[0].url:JYlivedyurl; @@ -56,6 +56,7 @@ function Live() { title: JYlivedyurl=="juying"?'本地✌':'本地', url: $("#noLoading#").lazyRule(() => { putMyVar('JYlivedyurl','juying'); + putMyVar('JYlivelocal','1'); refreshPage(false); return "toast://聚影直播本地源数据"; }), @@ -70,6 +71,7 @@ function Live() { title: JYlivedyurl==dyurl?dyname+'✌':dyname, url: $("#noLoading#").lazyRule((dyname,dyurl) => { putMyVar('JYlivedyurl',dyurl); + clearMyVar('JYlivelocal'); refreshPage(false); return "toast://已切换远程订阅:"+dyname; },dyname,dyurl), @@ -670,7 +672,6 @@ function LiveSet() { url: $("确定清空聚影直播本地文件?").confirm(()=>{ writeFile("hiker://files/rules/Src/Juying/live.txt", ""); putMyVar('isEdit','1'); - putMyVar('clearlive','1'); clearMyVar('JYlivenum'); refreshPage(false); return "toast://已清空";