emby支持多源

This commit is contained in:
mtvpls
2026-01-08 00:31:03 +08:00
parent b61db02478
commit 2736c9e845
22 changed files with 1316 additions and 572 deletions
+27
View File
@@ -0,0 +1,27 @@
import { NextResponse } from 'next/server';
import { embyManager } from '@/lib/emby-manager';
export const runtime = 'nodejs';
/**
* 获取所有启用的Emby源列表
*/
export async function GET() {
try {
const sources = await embyManager.getEnabledSources();
return NextResponse.json({
sources: sources.map(s => ({
key: s.key,
name: s.name,
})),
});
} catch (error) {
console.error('[Emby Sources] 获取Emby源列表失败:', error);
return NextResponse.json(
{ error: '获取Emby源列表失败', sources: [] },
{ status: 500 }
);
}
}