|
|
|
@ -26,11 +26,12 @@ function aliShare(share_id, folder_id, share_pwd) { |
|
|
|
|
let ordersKeys = Object.keys(orders); |
|
|
|
|
let orderskey = orders[getItem('aliyun_order', '聚影排序')]; |
|
|
|
|
let style = getItem('aliyun_style', 'avatar'); |
|
|
|
|
let filterFiles = []; |
|
|
|
|
d.push( |
|
|
|
|
{ |
|
|
|
|
title: "换源", |
|
|
|
|
url: $().lazyRule((name) => { |
|
|
|
|
if(getMyVar('SrcJy$back')=='1' || !name){ |
|
|
|
|
if(getMyVar('SrcJy$back')=='1'){ |
|
|
|
|
putMyVar('聚影云盘自动返回','1'); |
|
|
|
|
back(false); |
|
|
|
|
return 'hiker://empty'; |
|
|
|
@ -50,6 +51,8 @@ function aliShare(share_id, folder_id, share_pwd) { |
|
|
|
|
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/','/master/') + 'SrcJyAliDisk.js'); |
|
|
|
|
aliDiskSearch(name); |
|
|
|
|
}, name) |
|
|
|
|
}else{ |
|
|
|
|
return 'hiker://empty'; |
|
|
|
|
} |
|
|
|
|
},MY_PARAMS.name||""), |
|
|
|
|
col_type: 'icon_5', |
|
|
|
@ -160,6 +163,17 @@ function aliShare(share_id, folder_id, share_pwd) { |
|
|
|
|
filelist.sort(SortList); |
|
|
|
|
} |
|
|
|
|
filelist.forEach((item) => { |
|
|
|
|
log(item); |
|
|
|
|
let filesize = item.size / 1024 / 1024; |
|
|
|
|
let it = { |
|
|
|
|
title: item.name, |
|
|
|
|
img: item.thumbnail || (item.category == "video" ? "hiker://files/cache/src/影片.svg" : item.category == "audio" ? "hiker://files/cache/src/音乐.svg" : item.category == "image" ? "hiker://files/cache/src/图片.png" : "https://img.alicdn.com/imgextra/i1/O1CN01mhaPJ21R0UC8s9oik_!!6000000002049-2-tps-80-80.png"), |
|
|
|
|
desc: filesize < 1024 ? filesize.toFixed(2) + 'MB' : (filesize / 1024).toFixed(2) + 'GB', |
|
|
|
|
col_type: style, |
|
|
|
|
extra: { |
|
|
|
|
id: item.file_id |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (item.category == "video") { |
|
|
|
|
let sub_file_id; |
|
|
|
|
if (sublist.length == 1) { |
|
|
|
@ -171,33 +185,38 @@ function aliShare(share_id, folder_id, share_pwd) { |
|
|
|
|
sub_file_id = it.file_id; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(!sub_file_id){ |
|
|
|
|
sub_file_id = sublist[0].file_id; |
|
|
|
|
} |
|
|
|
|
let filesize = item.size / 1024 / 1024; |
|
|
|
|
d.push({ |
|
|
|
|
title: item.name, |
|
|
|
|
img: item.thumbnail || (item.category == "video" ? "hiker://files/cache/src/影片.svg" : item.category == "audio" ? "hiker://files/cache/src/音乐.svg" : item.category == "image" ? "hiker://files/cache/src/图片.png" : "https://img.alicdn.com/imgextra/i1/O1CN01mhaPJ21R0UC8s9oik_!!6000000002049-2-tps-80-80.png"), |
|
|
|
|
url: $("").lazyRule((share_id, file_id, sub_file_id, share_pwd) => { |
|
|
|
|
} |
|
|
|
|
it.url = $("").lazyRule((share_id, file_id, sub_file_id, share_pwd) => { |
|
|
|
|
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliPublic.js'); |
|
|
|
|
let play = getAliUrl(share_id, file_id, share_pwd); |
|
|
|
|
if (play.urls && play.urls.length>0) { |
|
|
|
|
let subtitle; |
|
|
|
|
if (sub_file_id) { |
|
|
|
|
subtitle = getSubtitle(share_id, sub_file_id, share_pwd); |
|
|
|
|
} |
|
|
|
|
if (subtitle) { |
|
|
|
|
play['subtitle'] = subtitle; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return JSON.stringify(play); |
|
|
|
|
} else { |
|
|
|
|
return "toast://获取播放列表失败,看日志有无异常或token无效"; |
|
|
|
|
} |
|
|
|
|
}, item.share_id, item.file_id, sub_file_id || "", share_pwd), |
|
|
|
|
desc: filesize < 1024 ? filesize.toFixed(2) + 'MB' : (filesize / 1024).toFixed(2) + 'GB', |
|
|
|
|
col_type: style, |
|
|
|
|
extra: { |
|
|
|
|
id: item.file_id |
|
|
|
|
}, item.share_id, item.file_id, sub_file_id || "", share_pwd); |
|
|
|
|
d.push(it); |
|
|
|
|
}else{ |
|
|
|
|
/* |
|
|
|
|
else if(category == "audio"){ |
|
|
|
|
return file_url + ";{Referer@https://www.aliyundrive.com/}#isMusic=true#"; |
|
|
|
|
}else if(category == "image"){ |
|
|
|
|
return file_url + "#.jpg@Referer=https://www.aliyundrive.com/"; |
|
|
|
|
}else{ |
|
|
|
|
return "download://" + file_url + ";{Referer@https://www.aliyundrive.com/}"; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
filterFiles.push({}); |
|
|
|
|
*/ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
d.push({ |
|
|
|
|