From d4b0e47d0a6a22c49fe8ebc408f88b09217a8e27 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Fri, 15 Dec 2023 23:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyAliDisk.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyAliDisk.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SrcJyAliDisk.js b/SrcJyAliDisk.js index 0f85c45b..6ddbdd95 100644 --- a/SrcJyAliDisk.js +++ b/SrcJyAliDisk.js @@ -801,12 +801,19 @@ function yundiskhistory() { let opentoken = getOpenToken(authorization); headers['authorization'] = 'Bearer ' + opentoken; let recentList = JSON.parse(request('https://openapi.aliyundrive.com/adrive/v1.0/openFile/video/recentList', { headers: headers, body: {"image_thumbnail_width":480,"fields":"*","video_thumbnail_width":480}, method: 'POST' })); - let arr = recentList.items; + let items = recentList.items; + let arr = []; + items.forEach(it=>{ + let index = arr.indexOf(arr.filter(d=>d.parent_file_id == parent_file_id)[0]); + if(index==-1){ + arr.push(it); + } + }) arr.forEach(it=>{ try{ let folder = JSON.parse(request('https://openapi.aliyundrive.com/adrive/v1.0/openFile/get', { headers: headers, body: {"drive_id":it.drive_id,"file_id":it.parent_file_id}, method: 'POST' })); d.push({ - title: it.name, + title: folder.name, url: $("hiker://empty#noRecordHistory#").rule((folder_id, isSearch, drive_id) => { //require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliDisk.js'); @@ -820,6 +827,7 @@ function yundiskhistory() { }, it.parent_file_id, 0, it.drive_id), img: it.thumbnail + "@Referer=https://www.aliyundrive.com/", + desc: it.name, col_type: "avatar", extra: { lastClick: it.name,