扫描修改为后台扫描,openlist登录增加账号密码
This commit is contained in:
@@ -39,7 +39,12 @@ export async function GET(request: NextRequest) {
|
||||
const folderPath = `${rootPath}${rootPath.endsWith('/') ? '' : '/'}${folderName}`;
|
||||
const filePath = `${folderPath}/${fileName}`;
|
||||
|
||||
const client = new OpenListClient(openListConfig.URL, openListConfig.Token);
|
||||
const client = new OpenListClient(
|
||||
openListConfig.URL,
|
||||
openListConfig.Token,
|
||||
openListConfig.Username,
|
||||
openListConfig.Password
|
||||
);
|
||||
|
||||
// 获取文件的播放链接
|
||||
const fileResponse = await client.getFile(filePath);
|
||||
|
||||
Reference in New Issue
Block a user