私人影库增加扫描模式

This commit is contained in:
mtvpls
2026-01-01 20:57:44 +08:00
parent 42b11c3679
commit a698c6b493
4 changed files with 62 additions and 18 deletions

View File

@@ -26,7 +26,7 @@ export async function POST(request: NextRequest) {
try {
const body = await request.json();
const { action, Enabled, URL, Username, Password, RootPath, OfflineDownloadPath, ScanInterval } = body;
const { action, Enabled, URL, Username, Password, RootPath, OfflineDownloadPath, ScanInterval, ScanMode } = body;
const authInfo = getAuthInfoFromCookie(request);
if (!authInfo || !authInfo.username) {
@@ -58,6 +58,7 @@ export async function POST(request: NextRequest) {
LastRefreshTime: adminConfig.OpenListConfig?.LastRefreshTime,
ResourceCount: adminConfig.OpenListConfig?.ResourceCount,
ScanInterval: 0,
ScanMode: ScanMode || 'hybrid',
};
await db.saveAdminConfig(adminConfig);
@@ -108,6 +109,7 @@ export async function POST(request: NextRequest) {
LastRefreshTime: adminConfig.OpenListConfig?.LastRefreshTime,
ResourceCount: adminConfig.OpenListConfig?.ResourceCount,
ScanInterval: scanInterval,
ScanMode: ScanMode || 'hybrid',
};
await db.saveAdminConfig(adminConfig);