From bdbbf43fb8b418f8097bf30504ff9ac1303d7942 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Tue, 21 Feb 2023 21:46:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyAlist.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyAlist.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SrcJyAlist.js b/SrcJyAlist.js index b5a0e7a6..1586bae3 100644 --- a/SrcJyAlist.js +++ b/SrcJyAlist.js @@ -13,11 +13,9 @@ let contain = /\.mp4|\.avi|\.mkv|\.rmvb|\.flv|\.mov|\.ts|\.mp3|\.m4a|\.wma|\.fla function gethtml(api,path,password) { try{ - log(api+"@"+path+"@"+password) path = path || ""; password = password || ""; let html = fetch(api, {body: {"path":path,"password":password},method:'POST',timeout:10000}); - log('html'+html); return html; }catch(e){ log(e.message); @@ -25,9 +23,11 @@ function gethtml(api,path,password) { } } function getlist(data,isdir) { + log(fileFilter); let list = data.filter(item => { - return isdir ? item.is_dir : fileFilter? contain.test(item.name) || /\.srt|\.vtt|\.ass/.test(item.name) : item.is_dir==0; + return isdir ? item.is_dir : fileFilter? (contain.test(item.name) || /\.srt|\.vtt|\.ass/.test(item.name)) : item.is_dir==0; }) + log(list); try{ //if(!isdir){ list.sort(SortList); @@ -35,7 +35,6 @@ function getlist(data,isdir) { }catch(e){ log(e.message); } - log(list); return list || []; }