|
|
@ -474,7 +474,7 @@ function alistSearch(alistapi,input) { |
|
|
|
let txt = pdfh(item,"a&&href"); |
|
|
|
let txt = pdfh(item,"a&&href"); |
|
|
|
let parent = txt.substring(0,txt.lastIndexOf("/")); |
|
|
|
let parent = txt.substring(0,txt.lastIndexOf("/")); |
|
|
|
let name = txt.substring(txt.lastIndexOf('/')+1); |
|
|
|
let name = txt.substring(txt.lastIndexOf('/')+1); |
|
|
|
let suffix = name.substring(txt.lastIndexOf('.')+1); |
|
|
|
let suffix = name.substring(name.lastIndexOf('.')+1); |
|
|
|
if(suffix.length>3 && !contain.test(suffix) && !dirlist.some(d => d.parent+'/'+d.name==parent)){ |
|
|
|
if(suffix.length>3 && !contain.test(suffix) && !dirlist.some(d => d.parent+'/'+d.name==parent)){ |
|
|
|
dirlist.push({ |
|
|
|
dirlist.push({ |
|
|
|
"parent": parent, |
|
|
|
"parent": parent, |
|
|
@ -482,13 +482,14 @@ function alistSearch(alistapi,input) { |
|
|
|
"is_dir": true |
|
|
|
"is_dir": true |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else if(contain.test(suffix) && !dirlist.some(d => d.parent+'/'+d.name==parent)){ |
|
|
|
}else if(contain.test(suffix) && !dirlist.some(d => d.parent+'/'+d.name==parent)){ |
|
|
|
filelist.push({ |
|
|
|
filelist.push({ |
|
|
|
"parent": parent, |
|
|
|
"parent": parent, |
|
|
|
"name": name, |
|
|
|
"name": name, |
|
|
|
"is_dir": false |
|
|
|
"is_dir": false |
|
|
|
})
|
|
|
|
})
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
log(name); |
|
|
|
log(name); |
|
|
|
|
|
|
|
log(suffix); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}catch(e){ |
|
|
|
}catch(e){ |
|
|
|