|
|
@ -411,6 +411,9 @@ function LiveSet() { |
|
|
|
img: "https://img.vinua.cn/images/QqyC.png", |
|
|
|
img: "https://img.vinua.cn/images/QqyC.png", |
|
|
|
url: $("","输入通用格式的tv链接地址").input((livecfgfile,liveconfig)=>{ |
|
|
|
url: $("","输入通用格式的tv链接地址").input((livecfgfile,liveconfig)=>{ |
|
|
|
if(input){ |
|
|
|
if(input){ |
|
|
|
|
|
|
|
if(/^\/storage/){ |
|
|
|
|
|
|
|
input = 'file://' + input; |
|
|
|
|
|
|
|
} |
|
|
|
let livedata = liveconfig['data']||[]; |
|
|
|
let livedata = liveconfig['data']||[]; |
|
|
|
if(!livedata.some(item => item.url==input)){ |
|
|
|
if(!livedata.some(item => item.url==input)){ |
|
|
|
showLoading('正在验证链接有效性...'); |
|
|
|
showLoading('正在验证链接有效性...'); |
|
|
@ -477,7 +480,9 @@ function LiveSet() { |
|
|
|
return "toast://更新失败"; |
|
|
|
return "toast://更新失败"; |
|
|
|
} |
|
|
|
} |
|
|
|
}else if(input=="删除订阅"){ |
|
|
|
}else if(input=="删除订阅"){ |
|
|
|
deleteCache(url); |
|
|
|
if(/^http/.test(url)){ |
|
|
|
|
|
|
|
deleteCache(url); |
|
|
|
|
|
|
|
} |
|
|
|
let livecfg = fetch(livecfgfile); |
|
|
|
let livecfg = fetch(livecfgfile); |
|
|
|
if(livecfg != ""){ |
|
|
|
if(livecfg != ""){ |
|
|
|
eval("var liveconfig = " + livecfg); |
|
|
|
eval("var liveconfig = " + livecfg); |
|
|
|