新增私人影视库功能

This commit is contained in:
mtvpls
2025-12-22 00:42:27 +08:00
parent ec042b1231
commit 3c55bc9d1a
24 changed files with 2233 additions and 10 deletions

View File

@@ -66,6 +66,13 @@ export async function POST(request: NextRequest) {
if (!key || !name || !api) {
return NextResponse.json({ error: '缺少必要参数' }, { status: 400 });
}
// 禁止添加 openlist 保留关键字
if (key === 'openlist') {
return NextResponse.json(
{ error: 'openlist 是保留关键字,不能作为视频源 key' },
{ status: 400 }
);
}
if (adminConfig.SourceConfig.some((s) => s.key === key)) {
return NextResponse.json({ error: '该源已存在' }, { status: 400 });
}