diff --git a/app/api/detail/route.ts b/app/api/detail/route.ts index ff4db7b..41fdf9a 100644 --- a/app/api/detail/route.ts +++ b/app/api/detail/route.ts @@ -61,30 +61,13 @@ export async function GET(request: NextRequest) { ); } - // Fetch video detail with automatic episode validation + // Fetch video detail without validation (already validated during search) try { const videoDetail = await getVideoDetail(id, sourceConfig); - // Validate episodes to filter out broken sources - if (videoDetail.episodes && videoDetail.episodes.length > 0) { - console.log(`[GET] Validating ${videoDetail.episodes.length} episodes for video ${id}...`); - const validatedEpisodes = await filterValidEpisodes(videoDetail.episodes); - const workingEpisodes = validatedEpisodes.filter(ep => ep.isValid); - - console.log(`[GET] Found ${workingEpisodes.length} working episodes out of ${videoDetail.episodes.length}`); - - if (workingEpisodes.length === 0) { - return NextResponse.json( - { - success: false, - error: 'No playable episodes found from this source. Please try another source.', - }, - { status: 404 } - ); - } - - videoDetail.episodes = workingEpisodes; - } + // Skip validation - videos are already checked during search + // Just return the episodes as-is + console.log(`[GET] Fetching video details for ${id} from ${sourceConfig.name}`); return NextResponse.json({ success: true, @@ -165,30 +148,13 @@ export async function POST(request: NextRequest) { ); } - // Fetch video detail with automatic episode validation + // Fetch video detail without validation (already validated during search) try { const videoDetail = await getVideoDetail(id, sourceConfig); - // Validate episodes to filter out broken sources - if (videoDetail.episodes && videoDetail.episodes.length > 0) { - console.log(`[POST] Validating ${videoDetail.episodes.length} episodes for video ${id}...`); - const validatedEpisodes = await filterValidEpisodes(videoDetail.episodes); - const workingEpisodes = validatedEpisodes.filter(ep => ep.isValid); - - console.log(`[POST] Found ${workingEpisodes.length} working episodes out of ${videoDetail.episodes.length}`); - - if (workingEpisodes.length === 0) { - return NextResponse.json( - { - success: false, - error: 'No playable episodes found from this source. Please try another source.', - }, - { status: 404 } - ); - } - - videoDetail.episodes = workingEpisodes; - } + // Skip validation - videos are already checked during search + // Just return the episodes as-is + console.log(`[POST] Fetching video details for ${id} from ${sourceConfig.name}`); return NextResponse.json({ success: true, diff --git a/app/api/search-stream/route.ts b/app/api/search-stream/route.ts index e5b2f3a..a9dad57 100644 --- a/app/api/search-stream/route.ts +++ b/app/api/search-stream/route.ts @@ -102,9 +102,9 @@ export async function POST(request: NextRequest) { const availableVideos: any[] = []; let checkedCount = 0; - const concurrency = 5; // Smaller batches for faster response + const concurrency = 10; // Check 10 videos at a time - // Process videos in smaller batches for immediate feedback + // Process videos in batches for immediate feedback for (let i = 0; i < allVideos.length; i += concurrency) { const batch = allVideos.slice(i, i + concurrency); diff --git a/app/favicon.ico b/app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/app/favicon.ico and /dev/null differ diff --git a/app/icon.png b/app/icon.png new file mode 100644 index 0000000..b346b5f Binary files /dev/null and b/app/icon.png differ diff --git a/app/layout.tsx b/app/layout.tsx index 5dc2920..692d3d9 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -16,9 +16,6 @@ const geistMono = Geist_Mono({ export const metadata: Metadata = { title: "KVideo - 视频聚合平台", description: "Multi-source video aggregation platform with beautiful Liquid Glass UI", - icons: { - icon: '/favicon.ico', - }, }; export default function RootLayout({ diff --git a/app/page.tsx b/app/page.tsx index 301e501..3a203d0 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -224,7 +224,7 @@ export default function Home() {