|
|
|
@ -396,9 +396,11 @@ function LiveSet() { |
|
|
|
|
if(input){ |
|
|
|
|
let livedata = liveconfig['data']||[]; |
|
|
|
|
if(!livedata.some(item => item.url==input)){ |
|
|
|
|
showLoading('正在验证链接有效性...'); |
|
|
|
|
let YChtml = request(input,{timeout:3000}); |
|
|
|
|
if(YChtml.indexOf('#genre#')>-1){ |
|
|
|
|
return $("","起个名字").input((livedata,url,livecfgfile,liveconfig)=>{ |
|
|
|
|
hideLoading(); |
|
|
|
|
return $("","链接有效,起个名字保存").input((livedata,url,livecfgfile,liveconfig)=>{ |
|
|
|
|
if(input){ |
|
|
|
|
livedata.push({name:input,url:url}); |
|
|
|
|
liveconfig['data'] = livedata; |
|
|
|
@ -410,6 +412,7 @@ function LiveSet() { |
|
|
|
|
} |
|
|
|
|
},livedata,input,livecfgfile,liveconfig) |
|
|
|
|
}else{ |
|
|
|
|
hideLoading(); |
|
|
|
|
return "toast://无法识别,需含#genre#的通用格式"; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|