mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 20:33:03 +00:00
新增文件列表解析接口/v2/getFileList?url=
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cn.qaiu.lz.web.controller;
|
||||
|
||||
|
||||
import cn.qaiu.entity.FileInfo;
|
||||
import cn.qaiu.entity.ShareLinkInfo;
|
||||
import cn.qaiu.lz.common.cache.CacheManager;
|
||||
import cn.qaiu.lz.common.util.URLParamUtil;
|
||||
@@ -35,7 +36,7 @@ public class ParserApi {
|
||||
private final UserService userService = AsyncServiceUtil.getAsyncServiceInstance(UserService.class);
|
||||
private final DbService dbService = AsyncServiceUtil.getAsyncServiceInstance(DbService.class);
|
||||
|
||||
@RouteMapping(value = "/login", method = RouteMethod.POST)
|
||||
@RouteMapping(value = "/login", method = RouteMethod.GET)
|
||||
public Future<SysUser> login(SysUser user) {
|
||||
log.info("<------- login: {}", user.getUsername());
|
||||
return userService.login(user);
|
||||
@@ -98,4 +99,10 @@ public class ParserApi {
|
||||
}}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@RouteMapping("/getFileList")
|
||||
public Future<List<FileInfo>> getFileList(HttpServerRequest request, String pwd) {
|
||||
String url = URLParamUtil.parserParams(request);
|
||||
ParserCreate parserCreate = ParserCreate.fromShareUrl(url).setShareLinkInfoPwd(pwd);
|
||||
return parserCreate.createTool().parseFileList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ public class UserServiceImpl implements UserService {
|
||||
@Override
|
||||
public Future<SysUser> login(SysUser user) {
|
||||
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(2);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// try {
|
||||
// TimeUnit.SECONDS.sleep(2);
|
||||
// } catch (InterruptedException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
return Future.succeededFuture(user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ custom:
|
||||
# 数据源配置
|
||||
dataSource:
|
||||
#jdbcUrl: jdbc:mysql://127.0.0.1:3306/nfddata?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false
|
||||
jdbcUrl: jdbc:h2:file:./db/nfdData;MODE=MySQL;DATABASE_TO_UPPER=FALSE
|
||||
jdbcUrl: jdbc:h2:file:./db/nfdData1;MODE=MySQL;DATABASE_TO_UPPER=FALSE
|
||||
username: root
|
||||
password: '123456'
|
||||
|
||||
@@ -48,21 +48,21 @@ cache:
|
||||
defaultDuration: 59
|
||||
# 具体网盘的缓存配置,如果不加配置则不缓存,每次请求都会请求网盘API,格式:网盘标识: 时长
|
||||
duration:
|
||||
ce: 5
|
||||
cow:
|
||||
ec: 5
|
||||
fc:
|
||||
fj: 20
|
||||
iz: 20
|
||||
le: 2879
|
||||
lz: 20
|
||||
qq: 9999999
|
||||
ws: 10
|
||||
ye: -1
|
||||
mne: 30
|
||||
mqq: 30
|
||||
mkg: 30
|
||||
p115: 5
|
||||
# ce: 5
|
||||
# cow:
|
||||
# ec: 5
|
||||
# fc:
|
||||
# fj: 20
|
||||
# iz: 20
|
||||
# le: 2879
|
||||
# lz: 20
|
||||
# qq: 9999999
|
||||
# ws: 10
|
||||
# ye: -1
|
||||
# mne: 30
|
||||
# mqq: 30
|
||||
# mkg: 30
|
||||
# p115: 5
|
||||
|
||||
# httpClient静态代理服务器配置(外网代理)
|
||||
proxy:
|
||||
|
||||
Reference in New Issue
Block a user