From a751de9f4af387b0423cdb021baa8234a2d6f247 Mon Sep 17 00:00:00 2001
From: src48597962 <48597962@qq.com>
Date: Tue, 18 Oct 2022 16:49:26 +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 | 58 ++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 45 insertions(+), 13 deletions(-)
diff --git a/SrcLive.js b/SrcLive.js
index 567a94e2..ae307b72 100644
--- a/SrcLive.js
+++ b/SrcLive.js
@@ -3,11 +3,18 @@ function Live() {
clearMyVar('editmode');
clearMyVar('clearlive');
clearMyVar('JYlivenum');
+ clearMyVar('JYlivedyurl');
}));
var d = [];
- let JYlivefile = "hiker://files/rules/Src/Juying/live.txt";
- let JYlive=fetch(JYlivefile);
-
+ d.push({
+ title: '聚影√     ⚙直播设置⚙',
+ img: "https://img.vinua.cn/images/QqyC.png",
+ url: $('hiker://empty#noRecordHistory##noHistory#').rule(() => {
+ require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcLive.js');
+ LiveSet();
+ }),
+ col_type: 'avatar'
+ });
let livecfgfile = "hiker://files/rules/Src/Juying/liveconfig.json";
let livecfg = fetch(livecfgfile);
if(livecfg != ""){
@@ -16,6 +23,37 @@ function Live() {
var liveconfig = {};
}
let livedata = liveconfig['data']||[];
+
+ let JYlivefile = "hiker://files/rules/Src/Juying/live.txt";
+ if(livedata.length>0){
+ for(let i=0;i'+livedata[i]:livedata[i],
+ url: $("#noLoading#").lazyRule(() => {
+ if(code=="exitedit"){
+ clearMyVar('editmode');
+ deleteItemByCls('editmenu');
+ return "toast://退出编辑,正常观看";
+ }else{
+ putMyVar('editmode',code);
+ }
+ for(let i in editnames){
+ if(editnames[i].split('|')[1]==code){
+ updateItem(code,{title:'‘‘’’'+name})
+ }else{
+ updateItem(editnames[i].split('|')[1],{title:editnames[i].split('|')[0]})
+ }
+ }
+ return "toast://进入"+name+"模式";
+ }),
+ col_type: 'scroll_button'
+ })
+ }
+ }
+
+
+ let JYlive=fetch(JYlivefile);
+
if(JYlive==""&&livedata.length>0&&getMyVar('clearlive','0')!="1"){
showLoading('发现订阅源,正在初始化');
log('本地源文件为空且有订阅,默认导入第一个订阅');
@@ -34,15 +72,7 @@ function Live() {
}else{
var JYlives = [];
}
- d.push({
- title: '聚影√     ⚙直播设置⚙',
- img: "https://img.vinua.cn/images/QqyC.png",
- url: $('hiker://empty#noRecordHistory##noHistory#').rule(() => {
- require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcLive.js');
- LiveSet();
- }),
- col_type: 'avatar'
- });
+
if(JYlives.length>0){
let datalist = [];
let datalist2 = [];
@@ -418,7 +448,7 @@ function LiveSet() {
for(let i=0;i{
+ url: $(["更新缓存","删除订阅","导入聚直播","导入聚影√","复制链接"],2,"").select((livecfgfile, url)=>{
try{
if(input=="更新缓存"){
showLoading('正在缓存,请稍后.');
@@ -529,6 +559,8 @@ function LiveSet() {
}else{
return "toast://文件异常,导入失败";
}
+ }else if(input=="复制链接"){
+ copy(url);
}
return "hiker://empty";
}catch(e){