|
|
|
@ -178,21 +178,78 @@ function arrayAdd(list,isdir,alistapi){ |
|
|
|
|
d.push({ |
|
|
|
|
title: item.name, |
|
|
|
|
img: item.thumb || "https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg@Referer=", |
|
|
|
|
url: $().lazyRule((api,path,password) => { |
|
|
|
|
url: $().lazyRule((api,path,password,sign) => { |
|
|
|
|
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJyAlist.js'); |
|
|
|
|
try{ |
|
|
|
|
let json = JSON.parse(gethtml(api + "/api/fs/get", path, password)); |
|
|
|
|
if(json.code==200&&json.data.raw_url){ |
|
|
|
|
if(json.code==200&&contain.test(json.data.raw_url)){ |
|
|
|
|
return json.data.raw_url;// + (/\.mp3|\.m4a|\.wav/.test(json.data.raw_url)?"#isMusic=true#":"#isVideo=true#");
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}catch(e){ |
|
|
|
|
return api + "/d"+ path; |
|
|
|
|
return api + "/d"+ path + "?sign=" + sign; |
|
|
|
|
} |
|
|
|
|
return "toast://播放失败,网盘失效"; |
|
|
|
|
}, alistapi.server, (MY_PARAMS.path||"") + "/" + item.name, alistapi.password), |
|
|
|
|
}, alistapi.server, (MY_PARAMS.path||"") + "/" + item.name, alistapi.password, item.sign), |
|
|
|
|
col_type: 'avatar', |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
return d; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
|
|
hiker://empty@lazyRule=.js:(
|
|
|
|
|
(item, url, path, list, u) => { |
|
|
|
|
const type_dict = {0: $.toString((url) => { |
|
|
|
|
return "download://" + url; |
|
|
|
|
} |
|
|
|
|
, url), 2: $.toString((url, list, u, path) => { |
|
|
|
|
var subtitles = $.require("api").getSubtitles(list, u, path); |
|
|
|
|
if (subtitles.length > 1) { |
|
|
|
|
var namelist = subtitles.map(function (item) { |
|
|
|
|
return item.name; |
|
|
|
|
}); |
|
|
|
|
return $(namelist, 1, "\u8bf7\u9009\u62e9\u5b57\u5e55").select((subtitles, namelist, url) => { |
|
|
|
|
return JSON.stringify({urls: [url], subtitle: subtitles[namelist.indexOf(input)].url}); |
|
|
|
|
} |
|
|
|
|
, subtitles, namelist, url); |
|
|
|
|
} else { |
|
|
|
|
return url + "#isVideo=true#"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
, url, list, u, path), 3: $.toString((url) => { |
|
|
|
|
return url + "#isMusic=true#"; |
|
|
|
|
} |
|
|
|
|
, url), 4: $.toString((url) => { |
|
|
|
|
return "download://" + url; |
|
|
|
|
} |
|
|
|
|
, url), 5: $.toString((url) => { |
|
|
|
|
return url + "#.jpg"; |
|
|
|
|
} |
|
|
|
|
, url)}; |
|
|
|
|
if (item.is_dir) { |
|
|
|
|
return "hiker://page/home?page=fypage"; |
|
|
|
|
} else { |
|
|
|
|
if ($.require("api").getHzm(item.name) == "pdf") { |
|
|
|
|
return "https://alist-org.github.io/pdf.js/web/viewer.html?file=" + url; |
|
|
|
|
} else { |
|
|
|
|
if ($.office.includes($.require("api").getHzm(item.name))) { |
|
|
|
|
return $(["\u5fae\u8f6f", "\u8c37\u6b4c"]).select((url) => { |
|
|
|
|
if (input == "\u5fae\u8f6f") { |
|
|
|
|
return "https://view.officeapps.live.com/op/view.aspx?src=" + url; |
|
|
|
|
} else { |
|
|
|
|
return "https://docs.google.com/gview?&embedded=true&url=" + url; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
, url); |
|
|
|
|
} else { |
|
|
|
|
return eval(type_dict[item.type]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
)({"name":"微软常用运行库.exe","size":34013425,"is_dir":false,"modified":"2021-11-19T12:42:25.187Z","sign":"eXl-v6t8UDdV7GwVao27L9UB3J1We2VtKXQrGbC2x3M=:0","thumb":"","type":0},"https://pan.ichuguang.com/d/%E7%B2%BE%E5%93%81%E8%BD%AF%E4%BB%B6/%E8%A1%A5%E4%B8%81%E4%BF%AE%E5%A4%8D/%E5%BE%AE%E8%BD%AF%E5%B8%B8%E7%94%A8%E8%BF%90%E8%A1%8C%E5%BA%93.exe?sign=eXl-v6t8UDdV7GwVao27L9UB3J1We2VtKXQrGbC2x3M=:0","/精品软件/补丁修复",[{"name":"微软常用运行库.exe","size":34013425,"is_dir":false,"modified":"2021-11-19T12:42:25.187Z","sign":"eXl-v6t8UDdV7GwVao27L9UB3J1We2VtKXQrGbC2x3M=:0","thumb":"","type":0},{"name":".NET Framework.exe","size":137905904,"is_dir":false,"modified":"2021-11-19T12:42:25.239Z","sign":"xrygxvnHgbXyyWeAIywo4mgzS6qDmd_kEjUAnoxqCtg=:0","thumb":"","type":0},{"name":"dll修复工具.exe","size":199775122,"is_dir":false,"modified":"2021-11-19T12:42:25.3Z","sign":"vg0luZS1OlImU5ufO25z7uW5wrdPo7Ve8k1BRhA_nbE=:0","thumb":"","type":0}],"https://pan.ichuguang.com/") |
|
|
|
|
*/ |