From 036e909f740c5d23cadda86679d6a57b3a947a11 Mon Sep 17 00:00:00 2001 From: mtvpls Date: Thu, 15 Jan 2026 23:48:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E9=9B=85=E8=8E=B7=E5=8F=96=E5=89=A7?= =?UTF-8?q?=E9=9B=86=E6=97=B6=E5=88=B7=E6=96=B0=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/play/page.tsx | 2 +- src/lib/xiaoya-metadata.ts | 4 ++-- src/lib/xiaoya.client.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 41ffb80..a09b118 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -6200,7 +6200,7 @@ function PlayPageClient() { // 使用轮询机制等待弹幕插件准备好(替代固定延迟) let pollAttempts = 0; - const maxPollAttempts = 60; // 最多尝试 60 次(30 秒) + const maxPollAttempts = 120; // 最多尝试 120 次(60 秒) const pollInterval = 500; // 每 500ms 检查一次 const pollForDanmakuPlugin = () => { diff --git a/src/lib/xiaoya-metadata.ts b/src/lib/xiaoya-metadata.ts index eb31ffd..c58f56a 100644 --- a/src/lib/xiaoya-metadata.ts +++ b/src/lib/xiaoya-metadata.ts @@ -290,7 +290,7 @@ export async function getXiaoyaEpisodes( if (isInSeasonDir) { // 电视剧:列出当前季的所有集 const seasonDir = pathParts.slice(0, -1).join('/'); - const listResponse = await xiaoyaClient.listDirectory(`/${seasonDir}`); + const listResponse = await xiaoyaClient.listDirectory(`/${seasonDir}`, 1, 100, true); const videoFiles = listResponse.content .filter(item => @@ -318,7 +318,7 @@ export async function getXiaoyaEpisodes( } else { // 目录路径或电影文件路径:列出该目录下的所有视频 const targetDir = isFilePath ? pathParts.slice(0, -1).join('/') : pathParts.join('/'); - const listResponse = await xiaoyaClient.listDirectory(`/${targetDir}`); + const listResponse = await xiaoyaClient.listDirectory(`/${targetDir}`, 1, 100, true); const videoFiles = listResponse.content .filter(item => diff --git a/src/lib/xiaoya.client.ts b/src/lib/xiaoya.client.ts index a8c6988..079339c 100644 --- a/src/lib/xiaoya.client.ts +++ b/src/lib/xiaoya.client.ts @@ -106,7 +106,7 @@ export class XiaoyaClient { /** * 列出目录内容 */ - async listDirectory(path: string, page = 1, perPage = 100): Promise { + async listDirectory(path: string, page = 1, perPage = 100, refresh = false): Promise { const token = await this.getToken(); const response = await fetch(`${this.baseURL}/api/fs/list`, { @@ -119,7 +119,7 @@ export class XiaoyaClient { path, page, per_page: perPage, - refresh: false, + refresh, }), });